From c5a672edaec28438e3dcb179b3595a34c47e3666 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Fri, 19 Jan 2024 12:48:10 -0600 Subject: [PATCH] Changed to constexpr in reco::Vertex This appears to help RNTuple migration. --- DataFormats/VertexReco/interface/Vertex.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DataFormats/VertexReco/interface/Vertex.h b/DataFormats/VertexReco/interface/Vertex.h index 7d7a119961eac..cec37f5b52205 100644 --- a/DataFormats/VertexReco/interface/Vertex.h +++ b/DataFormats/VertexReco/interface/Vertex.h @@ -39,7 +39,8 @@ namespace reco { /// point in the space typedef math::XYZPoint Point; /// error matrix dimension - enum { dimension = 3, dimension4D = 4 }; + constexpr static int dimension = 3; + constexpr static int dimension4D = 4; /// covariance error matrix (3x3) typedef math::Error::type Error; /// covariance error matrix (3x3) @@ -49,7 +50,7 @@ namespace reco { /// covariance error matrix (4x4) typedef math::Error::type CovarianceMatrix4D; /// matix size - enum { size = dimension * (dimension + 1) / 2, size4D = (dimension4D) * (dimension4D + 1) / 2 }; + constexpr static int size = dimension * (dimension + 1) / 2, size4D = (dimension4D) * (dimension4D + 1) / 2; /// index type typedef unsigned int index; /// default constructor - The vertex will not be valid. Position, error,