CMS 3D CMS Logo

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
heppy::ReclusterJets::LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: ReclusterJets.h:21
heppy::ReclusterJets::ReclusterJets
ReclusterJets(const std::vector< LorentzVector > &objects, double ktpower, double rparam)
Definition: ReclusterJets.cc:14
objects
Definition: __init__.py:1
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:153
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
HLT_2018_cff.zcut
zcut
Definition: HLT_2018_cff.py:7345
heppy::ReclusterJets::fjInputs_
std::vector< fastjet::PseudoJet > fjInputs_
Definition: ReclusterJets.h:51
heppy::ReclusterJets::getGrouping
std::vector< LorentzVector > getGrouping(double ptMin=0.0)
get grouping (inclusive jets)
Definition: ReclusterJets.cc:54
heppy::ReclusterJets::exclusiveJets_
std::vector< fastjet::PseudoJet > exclusiveJets_
Definition: ReclusterJets.h:60
heppy::ReclusterJets::fjClusterSeq_
ClusterSequencePtr fjClusterSeq_
Definition: ReclusterJets.h:58
heppy
TAKEN FROM http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/ElectroWeakAnalysis/Utilities/src/PdfWeig...
Definition: AlphaT.h:16
LorentzVector.h
heppy::ReclusterJets::inclusiveJets_
std::vector< fastjet::PseudoJet > inclusiveJets_
Definition: ReclusterJets.h:59
heppy::ReclusterJets::rparam_
double rparam_
Definition: ReclusterJets.h:54
heppy::ReclusterJets::getPruned
LorentzVector getPruned(double zcut, double rcutFactor)
get pruned 4-vector
Definition: ReclusterJets.cc:75
heppy::ReclusterJets::ClusterSequencePtr
std::shared_ptr< fastjet::ClusterSequence > ClusterSequencePtr
fastjet outputs
Definition: ReclusterJets.h:57
BTaggingMonitoring_cff.njets
njets
Definition: BTaggingMonitoring_cff.py:10
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
metsig::jet
Definition: SignAlgoResolutions.h:47
heppy::ReclusterJets::getGroupingExclusive
std::vector< LorentzVector > getGroupingExclusive(int njets)
get grouping (exclusive jets, until n are left)
Definition: ReclusterJets.cc:68
heppy::ReclusterJets::makeP4s
std::vector< LorentzVector > makeP4s(const std::vector< fastjet::PseudoJet > &jets)
Definition: ReclusterJets.cc:47
heppy::ReclusterJets::getPrunedSubjetExclusive
LorentzVector getPrunedSubjetExclusive(unsigned int isubjet, double zcut, double rcutFactor)
get pruned 4-vector for a given subject (must be called after getGroupingExclusive)
Definition: ReclusterJets.cc:82
heppy::ReclusterJets
Definition: ReclusterJets.h:19
heppy::ReclusterJets::ktpower_
double ktpower_
Definition: ReclusterJets.h:53
heppy::ReclusterJets::getPrunedSubjetInclusive
LorentzVector getPrunedSubjetInclusive(unsigned int isubjet, double zcut, double rcutFactor)
get pruned 4-vector for a given subject (must be called after getGroupingInclusive)
Definition: ReclusterJets.cc:90