Skip to content

Commit

Permalink
Fix initializer order and checksum for PackedCandidates
Browse files Browse the repository at this point in the history
  • Loading branch information
bendavid committed Sep 18, 2017
1 parent 253c0fa commit 813454e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions DataFormats/PatCandidates/interface/PackedCandidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ namespace pat {
packedPuppiweightNoLepDiff_(0),
rawCaloFraction_(0),
hcalFraction_(0),
isIsolatedChargedHadron_(0),
packedTime_(0),
packedTimeError_(0),
isIsolatedChargedHadron_(0),
p4_(new PolarLorentzVector(0,0,0,0)), p4c_( new LorentzVector(0,0,0,0)),
vertex_(new Point(0,0,0)), dphi_(0), deta_(0), dtrkpt_(0),track_(nullptr), pdgId_(0),
qualityFlags_(0), pvRefKey_(reco::VertexRef::invalidKey()),
Expand All @@ -55,7 +55,7 @@ namespace pat {
const reco::VertexRefProd &pvRefProd,
reco::VertexRef::key_type pvRefKey) :
packedPuppiweight_(0), packedPuppiweightNoLepDiff_(0), rawCaloFraction_(0), hcalFraction_(0),
isIsolatedChargedHadron_(0), packedTime_(0), packedTimeError_(0),
packedTime_(0), packedTimeError_(0), isIsolatedChargedHadron_(0),
p4_( new PolarLorentzVector(c.pt(), c.eta(), c.phi(), c.mass())),
p4c_( new LorentzVector(*p4_)), vertex_( new Point(c.vertex())),
dphi_(0), deta_(0), dtrkpt_(0),
Expand All @@ -70,7 +70,7 @@ namespace pat {
const reco::VertexRefProd &pvRefProd,
reco::VertexRef::key_type pvRefKey) :
packedPuppiweight_(0), packedPuppiweightNoLepDiff_(0), rawCaloFraction_(0), hcalFraction_(0),
isIsolatedChargedHadron_(0), packedTime_(0), packedTimeError_(0),
packedTime_(0), packedTimeError_(0), isIsolatedChargedHadron_(0),
p4_( new PolarLorentzVector(p4) ), p4c_( new LorentzVector(*p4_)),
vertex_( new Point(vtx) ),
dphi_(reco::deltaPhi(phiAtVtx,p4_.load()->phi())),
Expand All @@ -87,7 +87,7 @@ namespace pat {
const reco::VertexRefProd &pvRefProd,
reco::VertexRef::key_type pvRefKey) :
packedPuppiweight_(0), packedPuppiweightNoLepDiff_(0), rawCaloFraction_(0), hcalFraction_(0),
isIsolatedChargedHadron_(0), packedTime_(0), packedTimeError_(0),
packedTime_(0), packedTimeError_(0), isIsolatedChargedHadron_(0),
p4_(new PolarLorentzVector(p4.Pt(), p4.Eta(), p4.Phi(), p4.M())),
p4c_( new LorentzVector(p4)), vertex_( new Point(vtx) ) ,
dphi_(reco::deltaPhi(phiAtVtx,p4_.load()->phi())),
Expand All @@ -109,9 +109,9 @@ namespace pat {
packedPuppiweightNoLepDiff_(iOther.packedPuppiweightNoLepDiff_),
rawCaloFraction_(iOther.rawCaloFraction_),
hcalFraction_(iOther.hcalFraction_),
isIsolatedChargedHadron_(iOther.isIsolatedChargedHadron_),
packedTime_(iOther.packedTime_),
packedTimeError_(iOther.packedTimeError_),
isIsolatedChargedHadron_(iOther.isIsolatedChargedHadron_),
//Need to trigger unpacking in iOther
p4_( new PolarLorentzVector(iOther.polarP4() ) ),
p4c_( new LorentzVector(iOther.p4())), vertex_( new Point(iOther.vertex())),
Expand All @@ -135,9 +135,9 @@ namespace pat {
packedPuppiweightNoLepDiff_(iOther.packedPuppiweightNoLepDiff_),
rawCaloFraction_(iOther.rawCaloFraction_),
hcalFraction_(iOther.hcalFraction_),
isIsolatedChargedHadron_(iOther.isIsolatedChargedHadron_),
packedTime_(iOther.packedTime_),
packedTimeError_(iOther.packedTimeError_),
isIsolatedChargedHadron_(iOther.isIsolatedChargedHadron_),
p4_( iOther.p4_.exchange(nullptr) ) ,
p4c_( iOther.p4c_.exchange(nullptr)), vertex_(iOther.vertex_.exchange(nullptr)),
dxy_(iOther.dxy_), dz_(iOther.dz_),
Expand Down Expand Up @@ -169,9 +169,9 @@ namespace pat {
packedPuppiweightNoLepDiff_=iOther.packedPuppiweightNoLepDiff_;
rawCaloFraction_=iOther.rawCaloFraction_;
hcalFraction_=iOther.hcalFraction_;
isIsolatedChargedHadron_=iOther.isIsolatedChargedHadron_;
packedTime_=iOther.packedTime_;
packedTimeError_=iOther.packedTimeError_;
isIsolatedChargedHadron_=iOther.isIsolatedChargedHadron_;
//Need to trigger unpacking in iOther
if(p4_) {
*p4_ = iOther.polarP4();
Expand Down Expand Up @@ -246,9 +246,9 @@ namespace pat {
packedPuppiweightNoLepDiff_=iOther.packedPuppiweightNoLepDiff_;
rawCaloFraction_=iOther.rawCaloFraction_;
hcalFraction_=iOther.hcalFraction_;
isIsolatedChargedHadron_=iOther.isIsolatedChargedHadron_;
packedTime_=iOther.packedTime_;
packedTimeError_=iOther.packedTimeError_;
isIsolatedChargedHadron_=iOther.isIsolatedChargedHadron_;
delete p4_.exchange(iOther.p4_.exchange(nullptr));
delete p4c_.exchange(iOther.p4c_.exchange(nullptr));
delete vertex_.exchange(iOther.vertex_.exchange(nullptr));
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/PatCandidates/src/classes_def_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
<version ClassVersion="3" checksum="3320406063"/>
</class>
<class name="pat::PackedCandidate" ClassVersion="32">
<version ClassVersion="32" checksum="3392441617"/>
<version ClassVersion="32" checksum="926869123"/>
<version ClassVersion="31" checksum="1248040002"/>
<version ClassVersion="30" checksum="3338823671"/>
<version ClassVersion="29" checksum="649303924"/>
Expand Down

0 comments on commit 813454e

Please sign in to comment.