CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ReclusterJets.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Heppy_ReclusterJets_h
2 #define PhysicsTools_Heppy_ReclusterJets_h
3 
4 #include <vector>
5 #include <iostream>
6 #include <cmath>
7 #include <TLorentzVector.h>
8 #include <TMath.h>
10 
11 #include <fastjet/internal/base.hh>
12 #include "fastjet/PseudoJet.hh"
13 #include "fastjet/JetDefinition.hh"
14 #include "fastjet/ClusterSequence.hh"
15 #include "fastjet/Selector.hh"
16 #include "fastjet/PseudoJet.hh"
17 
18 namespace heppy {
19  class ReclusterJets {
20  public:
22 
23  ReclusterJets(const std::vector<LorentzVector> &objects, double ktpower, double rparam);
24 
26  std::vector<LorentzVector> getGrouping(double ptMin = 0.0);
27 
29  std::vector<LorentzVector> getGroupingExclusive(int njets);
30 
32  std::vector<LorentzVector> getGroupingExclusive(double dcut);
33 
35  LorentzVector getPruned(double zcut, double rcutFactor);
36 
38  LorentzVector getPrunedSubjetExclusive(unsigned int isubjet, double zcut, double rcutFactor);
39 
41  LorentzVector getPrunedSubjetInclusive(unsigned int isubjet, double zcut, double rcutFactor);
42 
43  private:
44  // pack the returns in a fwlite-friendly way
45  std::vector<LorentzVector> makeP4s(const std::vector<fastjet::PseudoJet> &jets);
46 
47  // prune and return in fa fwlite-friendly way
48  LorentzVector getPruned(const fastjet::PseudoJet &jet, double zcut, double rcutFactor);
49 
50  // used to handle the inputs
51  std::vector<fastjet::PseudoJet> fjInputs_; // fastjet inputs
52 
53  double ktpower_;
54  double rparam_;
55 
57  typedef std::shared_ptr<fastjet::ClusterSequence> ClusterSequencePtr;
59  std::vector<fastjet::PseudoJet> inclusiveJets_;
60  std::vector<fastjet::PseudoJet> exclusiveJets_;
61  };
62 } // namespace heppy
63 #endif
math::XYZTLorentzVector LorentzVector
Definition: ReclusterJets.h:21
std::vector< fastjet::PseudoJet > fjInputs_
Definition: ReclusterJets.h:51
std::vector< LorentzVector > getGroupingExclusive(int njets)
get grouping (exclusive jets, until n are left)
constexpr float ptMin
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_
Definition: ReclusterJets.h:60
ClusterSequencePtr fjClusterSeq_
Definition: ReclusterJets.h:58
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
ReclusterJets(const std::vector< LorentzVector > &objects, double ktpower, double rparam)
vector< PseudoJet > jets
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::shared_ptr< fastjet::ClusterSequence > ClusterSequencePtr
fastjet outputs
Definition: ReclusterJets.h:57
std::vector< fastjet::PseudoJet > inclusiveJets_
Definition: ReclusterJets.h:59
std::vector< LorentzVector > makeP4s(const std::vector< fastjet::PseudoJet > &jets)