From 4e80f2702fb1d61f53d11b90660a0c32e49b0f7e Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 24 Nov 2015 15:08:46 +0100 Subject: [PATCH] Delete also vertex_ in packBoth() Otherwise it will not be set to the unpacked values in unpackVtx(). --- DataFormats/PatCandidates/interface/PackedCandidate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DataFormats/PatCandidates/interface/PackedCandidate.h b/DataFormats/PatCandidates/interface/PackedCandidate.h index de779165bcda4..f8318fe892edc 100644 --- a/DataFormats/PatCandidates/interface/PackedCandidate.h +++ b/DataFormats/PatCandidates/interface/PackedCandidate.h @@ -590,7 +590,7 @@ namespace pat { void packVtx(bool unpackAfterwards=true) ; void unpackVtx() const ; void maybeUnpackBoth() const { if (!p4c_) unpack(); if (!vertex_) unpackVtx(); } - void packBoth() { pack(false); packVtx(false); delete p4_.exchange(nullptr); delete p4c_.exchange(nullptr); unpack(); unpackVtx(); } // do it this way, so that we don't loose precision on the angles before computing dxy,dz + void packBoth() { pack(false); packVtx(false); delete p4_.exchange(nullptr); delete p4c_.exchange(nullptr); delete vertex_.exchange(nullptr); unpack(); unpackVtx(); } // do it this way, so that we don't loose precision on the angles before computing dxy,dz void unpackTrk() const ; int8_t packedPuppiweight_;