27 #ifndef RecoJets_FFTJetProducers_FFTJetProducer_h 28 #define RecoJets_FFTJetProducers_FFTJetProducer_h 33 #include "fftjet/AbsRecombinationAlg.hh" 34 #include "fftjet/AbsVectorRecombinationAlg.hh" 35 #include "fftjet/SparseClusteringTree.hh" 38 #include "fftjet/VectorRecombinationAlgFactory.hh" 39 #include "fftjet/RecombinationAlgFactory.hh" 79 typedef fftjet::RecombinedJet<fftjetcms::VectorLike>
RecoFFTJet;
80 typedef fftjet::SparseClusteringTree<fftjet::Peak, long>
SparseTree;
87 CONSTITUENTS_RESUMMED = 0x100,
88 PILEUP_CALCULATED = 0x200,
89 PILEUP_SUBTRACTED_4VEC = 0x400,
90 PILEUP_SUBTRACTED_PT = 0x800
93 enum Resolution { FIXED = 0, MAXIMALLY_STABLE, GLOBALLY_ADAPTIVE, LOCALLY_ADAPTIVE, FROM_GENJETS };
105 void endJob()
override;
112 virtual void selectPreclusters(
const SparseTree&
tree,
113 const fftjet::Functor1<bool, fftjet::Peak>& peakSelector,
114 std::vector<fftjet::Peak>* preclusters);
117 virtual void genJetPreclusters(
const SparseTree& tree,
120 const fftjet::Functor1<bool, fftjet::Peak>& peakSelector,
121 std::vector<fftjet::Peak>* preclusters);
127 virtual void assignMembershipFunctions(std::vector<fftjet::Peak>* preclusters);
130 virtual std::unique_ptr<fftjet::Functor1<bool, fftjet::Peak> > parse_peakSelector(
const edm::ParameterSet&);
133 virtual std::unique_ptr<fftjet::ScaleSpaceKernel> parse_jetMembershipFunction(
const edm::ParameterSet&);
136 virtual std::unique_ptr<fftjetcms::AbsBgFunctor> parse_bgMembershipFunction(
const edm::ParameterSet&);
139 virtual std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > parse_recoScaleCalcPeak(
const edm::ParameterSet&);
142 virtual std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > parse_recoScaleRatioCalcPeak(
146 virtual std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > parse_memberFactorCalcPeak(
const edm::ParameterSet&);
149 virtual std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > parse_recoScaleCalcJet(
const edm::ParameterSet&);
151 virtual std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > parse_recoScaleRatioCalcJet(
const edm::ParameterSet&);
153 virtual std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > parse_memberFactorCalcJet(
const edm::ParameterSet&);
157 virtual std::unique_ptr<fftjet::Functor2<double, RecoFFTJet, RecoFFTJet> > parse_jetDistanceCalc(
161 virtual std::unique_ptr<fftjetcms::AbsPileupCalculator> parse_pileupDensityCalc(
const edm::ParameterSet& ps);
166 void selectTreeNodes(
const SparseTree& tree,
167 const fftjet::Functor1<bool, fftjet::Peak>& peakSelect,
168 std::vector<SparseTree::NodeId>*
nodes);
171 typedef fftjet::AbsVectorRecombinationAlg<fftjetcms::VectorLike, fftjetcms::BgData>
RecoAlg;
172 typedef fftjet::AbsRecombinationAlg<fftjetcms::Real, fftjetcms::VectorLike, fftjetcms::BgData>
GridAlg;
180 template <
class Real>
183 void removeFakePreclusters();
187 bool loadEnergyFlow(
const edm::Event&
iEvent, std::unique_ptr<fftjet::Grid2d<fftjetcms::Real> >&
flow);
189 void prepareRecombinationScales();
190 bool checkConvergence(
const std::vector<RecoFFTJet>& previousIterResult, std::vector<RecoFFTJet>& thisIterResult);
191 void determineGriddedConstituents();
192 void determineVectorConstituents();
195 template <
typename Jet>
198 template <
typename Jet>
205 std::unique_ptr<fftjet::Grid2d<fftjetcms::Real> >&
density);
210 std::unique_ptr<fftjet::Grid2d<fftjetcms::Real> >&
density);
214 void determinePileup();
222 unsigned iterateJetReconstruction();
225 static void setJetStatusBit(RecoFFTJet*
jet,
int mask,
bool value);
350 std::vector<SparseTree::NodeId>
nodes;
381 std::vector<fftjetcms::VectorLike>
pileup;
403 #endif // RecoJets_FFTJetProducers_FFTJetProducer_h
std::vector< std::vector< reco::CandidatePtr > > constituents
std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
unsigned iterationsPerformed
const bool useGriddedAlgorithm
std::vector< fftjetcms::VectorLike > pileup
const bool resumConstituents
const double gridScanMaxEta
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
const std::string recombinationAlgorithm
const bool subtractPileupAs4Vec
const double unlikelyBgWeight
const bool subtractPileup
const unsigned nJetsRequiredToConverge
std::vector< double > doubleBuf
std::vector< fftjet::AbsKernel2d * > memFcns2dVec
std::vector< RecoFFTJet > recoJets
std::unique_ptr< GridAlg > gridAlg
const double recombinationDataCutoff
fftjet::AbsVectorRecombinationAlg< fftjetcms::VectorLike, fftjetcms::BgData > RecoAlg
std::vector< unsigned > occupancy
const double minStableScale
const double maxStableScale
std::vector< fftjet::Peak > preclusters
edm::EDGetTokenT< reco::PattRecoTree< fftjetcms::Real, reco::PattRecoPeak< fftjetcms::Real > > > input_recotree_token_
const bool reuseExistingGrid
const unsigned nClustersRequested
std::unique_ptr< std::vector< double > > iniScales
fftjet::AbsRecombinationAlg< fftjetcms::Real, fftjetcms::VectorLike, fftjetcms::BgData > GridAlg
std::unique_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
math::XYZTLorentzVector VectorLike
fftjet::SparseClusteringTree< fftjet::Peak, long > SparseTree
std::vector< RecoFFTJet > iterJets
std::vector< unsigned > cellCountsVec
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
std::string pileupTableRecord
std::string pileupTableName
std::vector< double > thresholds
const bool calculatePileup
const bool assignConstituents
A grid filled with discretized energy flow.
const edm::InputTag treeLabel
const edm::InputTag genJetsLabel
const edm::ParameterSet myConfiguration
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > input_energyflow_token_
fftjet::RecombinedJet< fftjetcms::VectorLike > RecoFFTJet
edm::EDGetTokenT< reco::FFTJetPileupSummary > input_pusummary_token_
const double stabilityAlpha
const unsigned maxInitialPreclusters
std::string pileupTableCategory
std::unique_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
std::vector< SparseTree::NodeId > nodes
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
const double convergenceDistance
edm::EDGetTokenT< std::vector< reco::FFTAnyJet< reco::GenJet > > > input_genjet_token_
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
const edm::InputTag pileupLabel
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
std::unique_ptr< RecoAlg > recoAlg
fftjetcms::VectorLike unclustered
std::vector< fftjet::Peak > iterPreclusters
const unsigned maxIterations