Skip to content

Commit

Permalink
Merge pull request #8 from dmajumder/CMSSW_7_4_X
Browse files Browse the repository at this point in the history
fixing copy constructor
  • Loading branch information
dmajumder committed Jun 29, 2015
2 parents 717f286 + 782e1ff commit b5b705b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AnalysisDataFormats/BoostedObjects/interface/Candidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace vlq{
Candidate ( const TLorentzVector& p4 ) :
p4_(p4)
{}
Candidate (const vlq::Candidate& cand )
Candidate (vlq::Candidate const & cand )
{ *this = cand ; }
float getPt () const { return p4_.Pt() ; }
float getEta () const { return p4_.Eta() ; }
Expand All @@ -26,6 +26,10 @@ namespace vlq{
float getMass () const { return p4_.Mag() ; }
TLorentzVector getP4() const { return p4_ ; }
void setP4 ( const TLorentzVector& p4 ) { p4_ = p4 ; }
const vlq::Candidate& operator=(vlq::Candidate const & cand) {
p4_ = cand.getP4() ;
return *this ;
}
protected:
TLorentzVector p4_ ;
};
Expand Down

0 comments on commit b5b705b

Please sign in to comment.