CMS 3D CMS Logo

ProtoJet.cc File Reference

#include "DataFormats/Candidate/interface/Candidate.h"
#include "RecoJets/JetAlgorithms/interface/ProtoJet.h"
#include "RecoJets/JetAlgorithms/interface/JetAlgoHelper.h"
#include <vector>
#include <algorithm>
#include <numeric>

Go to the source code of this file.

Functions

template<class T>
ProtoJet::LorentzVector calculateLorentzVectorRecombination (const ProtoJet::Constituents &fConstituents)


Function Documentation

template<class T>
ProtoJet::LorentzVector @13070::calculateLorentzVectorRecombination ( const ProtoJet::Constituents fConstituents  )  [inline, static]

Definition at line 32 of file ProtoJet.cc.

References c, i, HLT_VtxMuL3::result, weight, and weights.

00032                                                                                                                {
00033     T weightMaker;
00034     ProtoJet::LorentzVector result (0,0,0,0);
00035     double weights = 0;
00036     for(ProtoJet::Constituents::const_iterator i = fConstituents.begin(); i !=  fConstituents.end(); ++i) {
00037       const ProtoJet::Constituent c = *i;
00038       double weight = weightMaker.weight (*c);
00039       result += c->p4() * weight;
00040       weights += weight;
00041     } //end of loop over the jet constituents
00042     result = result / weights;
00043     return result;
00044   }


Generated on Tue Jun 9 17:55:17 2009 for CMSSW by  doxygen 1.5.4