5 #include "fastjet/tools/Pruner.hh" 14 ReclusterJets::ReclusterJets(
const std::vector<LorentzVector> &
objects,
double ktpower,
double rparam)
15 : ktpower_(ktpower), rparam_(rparam) {
20 fastjet::PseudoJet
j(
o.Px(),
o.Py(),
o.Pz(),
o.E());
27 fastjet::JetDefinition jet_def;
31 jet_def = JetDefinition(kt_algorithm,
rparam_);
33 jet_def = JetDefinition(cambridge_algorithm,
rparam_);
35 jet_def = JetDefinition(antikt_algorithm,
rparam_);
37 throw cms::Exception(
"InvalidArgument",
"Unsupported ktpower value");
48 std::vector<math::XYZTLorentzVector> JetObjectsAll;
49 JetObjectsAll.reserve(
jets.size());
50 for (
const fastjet::PseudoJet &pj :
jets) {
51 JetObjectsAll.push_back(
LorentzVector(pj.px(), pj.py(), pj.pz(), pj.e()));
87 throw cms::Exception(
"InvalidArgument",
"getPrunedSubjetExclusive called for non-existing exclusive subjet");
95 throw cms::Exception(
"InvalidArgument",
"getPrunedSubjetInclusive called for non-existing inclusive subjet");
102 fastjet::Pruner pruner(fastjet::cambridge_algorithm,
zcut, rcutFactor);
104 fastjet::PseudoJet pruned_jet = pruner(
jet);
105 return LorentzVector(pruned_jet.px(), pruned_jet.py(), pruned_jet.pz(), pruned_jet.e());
math::XYZTLorentzVector LorentzVector
std::vector< fastjet::PseudoJet > fjInputs_
std::vector< LorentzVector > getGroupingExclusive(int njets)
get grouping (exclusive jets, until n are left)
LorentzVector getPrunedSubjetInclusive(unsigned int isubjet, double zcut, double rcutFactor)
get pruned 4-vector for a given subject (must be called after getGroupingInclusive) ...
std::vector< LorentzVector > getGrouping(double ptMin=0.0)
get grouping (inclusive jets)
std::vector< fastjet::PseudoJet > exclusiveJets_
ClusterSequencePtr fjClusterSeq_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
TAKEN FROM http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/ElectroWeakAnalysis/Utilities/src/PdfWeig...
LorentzVector getPruned(double zcut, double rcutFactor)
get pruned 4-vector
LorentzVector getPrunedSubjetExclusive(unsigned int isubjet, double zcut, double rcutFactor)
get pruned 4-vector for a given subject (must be called after getGroupingExclusive) ...
std::vector< fastjet::PseudoJet > inclusiveJets_
std::vector< LorentzVector > makeP4s(const std::vector< fastjet::PseudoJet > &jets)