File indexing completed on 2024-04-06 12:25:24
0001 #ifndef RecoJets_JetAlgorithms_CATopJetAlgorithm_h
0002 #define RecoJets_JetAlgorithms_CATopJetAlgorithm_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <vector>
0015 #include <list>
0016 #include <functional>
0017 #include <TMath.h>
0018 #include <iostream>
0019
0020 #include "DataFormats/Candidate/interface/Candidate.h"
0021 #include "DataFormats/CaloTowers/interface/CaloTower.h"
0022 #include "DataFormats/CaloTowers/interface/CaloTowerDefs.h"
0023 #include "DataFormats/JetReco/interface/CaloJet.h"
0024 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
0025 #include "DataFormats/JetReco/interface/BasicJet.h"
0026 #include "DataFormats/JetReco/interface/BasicJetCollection.h"
0027 #include "DataFormats/Math/interface/deltaR.h"
0028 #include "RecoJets/JetAlgorithms/interface/JetAlgoHelper.h"
0029 #include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
0030 #include "DataFormats/Candidate/interface/LeafCandidate.h"
0031 #include "FWCore/Framework/interface/Event.h"
0032
0033 #include "RecoJets/JetAlgorithms/interface/CompoundPseudoJet.h"
0034
0035 #include <fastjet/JetDefinition.hh>
0036 #include <fastjet/PseudoJet.hh>
0037 #include <fastjet/ClusterSequence.hh>
0038 #include <fastjet/GhostedAreaSpec.hh>
0039 #include <fastjet/ClusterSequenceArea.hh>
0040
0041 class CATopJetAlgorithm {
0042 public:
0043
0044
0045 CATopJetAlgorithm(const edm::InputTag& mSrc,
0046 bool verbose,
0047 int algorithm,
0048 int useAdjacency,
0049 double centralEtaCut,
0050 double ptMin,
0051 const std::vector<double>& sumEtBins,
0052 const std::vector<double>& rBins,
0053 const std::vector<double>& ptFracBins,
0054 const std::vector<double>& deltarBins,
0055 const std::vector<double>& nCellBins,
0056 double seedThreshold,
0057 bool useMaxTower,
0058 double sumEtEtaCut,
0059 double etFrac)
0060 : mSrc_(mSrc),
0061 verbose_(verbose),
0062 algorithm_(algorithm),
0063 useAdjacency_(useAdjacency),
0064 centralEtaCut_(centralEtaCut),
0065 ptMin_(ptMin),
0066 sumEtBins_(sumEtBins),
0067 rBins_(rBins),
0068 ptFracBins_(ptFracBins),
0069 deltarBins_(deltarBins),
0070 nCellBins_(nCellBins),
0071 seedThreshold_(seedThreshold),
0072 useMaxTower_(useMaxTower),
0073 sumEtEtaCut_(sumEtEtaCut),
0074 etFrac_(etFrac)
0075
0076 {}
0077
0078
0079 void run(const std::vector<fastjet::PseudoJet>& cell_particles,
0080 std::vector<fastjet::PseudoJet>& hardjetsOutput,
0081 std::shared_ptr<fastjet::ClusterSequence>& fjClusterSeq);
0082
0083 private:
0084 edm::InputTag mSrc_;
0085 bool verbose_;
0086 int algorithm_;
0087 int useAdjacency_;
0088
0089
0090
0091
0092 double centralEtaCut_;
0093 double ptMin_;
0094 std::vector<double>
0095 sumEtBins_;
0096 std::vector<double> rBins_;
0097 std::vector<double> ptFracBins_;
0098 std::vector<double> deltarBins_;
0099 std::vector<double>
0100 nCellBins_;
0101
0102 double seedThreshold_;
0103 bool useMaxTower_;
0104 double sumEtEtaCut_;
0105 double etFrac_;
0106 std::string jetType_;
0107
0108
0109 bool adjacentCells(const fastjet::PseudoJet& jet1,
0110 const fastjet::PseudoJet& jet2,
0111 const std::vector<fastjet::PseudoJet>& cell_particles,
0112 const fastjet::ClusterSequence& theClusterSequence,
0113 double nCellMin) const;
0114
0115
0116
0117 bool decomposeJet(const fastjet::PseudoJet& theJet,
0118 const fastjet::ClusterSequence& theClusterSequence,
0119 const std::vector<fastjet::PseudoJet>& cell_particles,
0120 double ptHard,
0121 double nCellMin,
0122 double deltarcut,
0123 fastjet::PseudoJet& ja,
0124 fastjet::PseudoJet& jb,
0125 std::vector<fastjet::PseudoJet>& leftovers) const;
0126 };
0127
0128 #endif