#include <PhysicsTools/CandUtils/interface/AddFourMomenta.h>
Public Member Functions | |
AddFourMomenta (const edm::ParameterSet &) | |
constructor | |
AddFourMomenta () | |
default constructor | |
void | set (reco::Candidate &c) const |
set up a candidate |
Definition at line 18 of file AddFourMomenta.h.
AddFourMomenta::AddFourMomenta | ( | ) | [inline] |
AddFourMomenta::AddFourMomenta | ( | const edm::ParameterSet & | ) | [inline, explicit] |
void AddFourMomenta::set | ( | reco::Candidate & | c | ) | const |
set up a candidate
Definition at line 7 of file AddFourMomenta.cc.
References b, reco::Candidate::begin(), d, e, reco::Candidate::end(), p4, reco::Particle::setCharge(), and reco::Particle::setP4().
Referenced by V0Fitter::fitAll(), TtSemiLepHypothesis::hypo(), PFRecoTauDecayModeDeterminator::mergePiZeroes(), PFRecoTauDecayModeDeterminator::produce(), TruthTauDecayModeProducer::produce(), and TtSemiEvtSolution::setupHyp().
00007 { 00008 Candidate::LorentzVector p4( 0, 0, 0, 0 ); 00009 Candidate::Charge charge = 0; 00010 Candidate::iterator b = c.begin(), e = c.end(); 00011 for( Candidate::iterator d = b; d != e; ++ d ) { 00012 p4 += d->p4(); 00013 charge += d->charge(); 00014 } 00015 c.setP4( p4 ); 00016 c.setCharge( charge ); 00017 }