3 #include "fastjet/tools/Pruner.hh"
8 using namespace fastjet;
12 ReclusterJets::ReclusterJets(
const std::vector<LorentzVector> & objects,
double ktpower,
double rparam) :
13 ktpower_(ktpower), rparam_(rparam)
19 fastjet::PseudoJet
j(
o.Px(),
o.Py(),
o.Pz(),
o.E());
20 j.set_user_index(index); index++;
29 jet_def = JetDefinition(kt_algorithm,
rparam_);
31 jet_def = JetDefinition(cambridge_algorithm,
rparam_);
33 jet_def = JetDefinition(antikt_algorithm,
rparam_);
35 throw cms::Exception(
"InvalidArgument",
"Unsupported ktpower value");
46 std::vector<math::XYZTLorentzVector> JetObjectsAll;
47 for (
const fastjet::PseudoJet & pj : jets) {
48 JetObjectsAll.push_back(
LorentzVector( pj.px(), pj.py(), pj.pz(), pj.e() ) );
82 throw cms::Exception(
"InvalidArgument",
"getPrunedSubjetExclusive called for non-existing exclusive subjet");
88 throw cms::Exception(
"InvalidArgument",
"getPrunedSubjetInclusive called for non-existing inclusive subjet");
95 fastjet::Pruner pruner(fastjet::cambridge_algorithm, zcut, rcutFactor);
97 fastjet::PseudoJet pruned_jet = pruner(jet);
98 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.
boost::shared_ptr< fastjet::ClusterSequence > ClusterSequencePtr
fastjet outputs
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)