CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
FFTJetProducer Class Reference

#include <RecoJets/FFTJetProducers/plugins/FFTJetProducer.h>

Inheritance diagram for FFTJetProducer:
fftjetcms::FFTJetInterface edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef fftjet::RecombinedJet< fftjetcms::VectorLikeRecoFFTJet
 
enum  Resolution {
  FIXED = 0, MAXIMALLY_STABLE, GLOBALLY_ADAPTIVE, LOCALLY_ADAPTIVE,
  FROM_GENJETS
}
 
typedef fftjet::SparseClusteringTree< fftjet::Peak, long > SparseTree
 
enum  StatusBits {
  RESOLUTION = 0xff, CONSTITUENTS_RESUMMED = 0x100, PILEUP_CALCULATED = 0x200, PILEUP_SUBTRACTED_4VEC = 0x400,
  PILEUP_SUBTRACTED_PT = 0x800
}
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 FFTJetProducer (const edm::ParameterSet &)
 
 ~FFTJetProducer () override
 
- Public Member Functions inherited from fftjetcms::FFTJetInterface
 ~FFTJetInterface () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static Resolution parse_resolution (const std::string &name)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Protected Member Functions

virtual void assignMembershipFunctions (std::vector< fftjet::Peak > *preclusters)
 
void beginJob () override
 
void endJob () override
 
virtual void genJetPreclusters (const SparseTree &tree, edm::Event &, const edm::EventSetup &, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
 
virtual std::unique_ptr< fftjetcms::AbsBgFunctorparse_bgMembershipFunction (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > parse_jetDistanceCalc (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::ScaleSpaceKernel > parse_jetMembershipFunction (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_memberFactorCalcJet (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_memberFactorCalcPeak (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > parse_peakSelector (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjetcms::AbsPileupCalculatorparse_pileupDensityCalc (const edm::ParameterSet &ps)
 
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleCalcJet (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleCalcPeak (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleRatioCalcJet (const edm::ParameterSet &)
 
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleRatioCalcPeak (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
virtual void selectPreclusters (const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
 
void selectTreeNodes (const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelect, std::vector< SparseTree::NodeId > *nodes)
 
- Protected Member Functions inherited from fftjetcms::FFTJetInterface
template<class Ptr >
void checkConfig (const Ptr &ptr, const char *message)
 
void discretizeEnergyFlow ()
 
 FFTJetInterface (const edm::ParameterSet &)
 
double getEventScale () const
 
void loadInputCollection (const edm::Event &)
 
bool storeInSinglePrecision () const
 
const reco::Particle::PointvertexUsed () const
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Types

typedef fftjet::AbsRecombinationAlg< fftjetcms::Real, fftjetcms::VectorLike, fftjetcms::BgDataGridAlg
 
typedef fftjet::AbsVectorRecombinationAlg< fftjetcms::VectorLike, fftjetcms::BgDataRecoAlg
 

Private Member Functions

void buildGridAlg ()
 
bool checkConvergence (const std::vector< RecoFFTJet > &previousIterResult, std::vector< RecoFFTJet > &thisIterResult)
 
void determineGriddedConstituents ()
 
void determinePileup ()
 
virtual void determinePileupDensityFromConfig (const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
 
virtual void determinePileupDensityFromDB (const edm::Event &iEvent, const edm::EventSetup &iSetup, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
 
void determineVectorConstituents ()
 
 FFTJetProducer ()=delete
 
 FFTJetProducer (const FFTJetProducer &)=delete
 
unsigned iterateJetReconstruction ()
 
bool loadEnergyFlow (const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &flow)
 
template<class Real >
void loadSparseTreeData (const edm::Event &)
 
template<typename Jet >
void makeProduces (const std::string &alias, const std::string &tag)
 
FFTJetProduceroperator= (const FFTJetProducer &)=delete
 
void prepareRecombinationScales ()
 
void removeFakePreclusters ()
 
void saveResults (edm::Event &iEvent, const edm::EventSetup &, unsigned nPreclustersFound)
 
template<typename Jet >
void writeJets (edm::Event &iEvent, const edm::EventSetup &)
 

Static Private Member Functions

static void setJetStatusBit (RecoFFTJet *jet, int mask, bool value)
 

Private Attributes

const bool assignConstituents
 
std::unique_ptr< fftjetcms::AbsBgFunctorbgMembershipFunction
 
const bool calculatePileup
 
std::vector< unsigned > cellCountsVec
 
std::vector< std::vector< reco::CandidatePtr > > constituents
 
const double convergenceDistance
 
std::vector< double > doubleBuf
 
const double fixedScale
 
const edm::InputTag genJetsLabel
 
std::unique_ptr< GridAlggridAlg
 
const double gridScanMaxEta
 
std::unique_ptr< std::vector< double > > iniScales
 
edm::EDGetTokenT< reco::DiscretizedEnergyFlowinput_energyflow_token_
 
edm::EDGetTokenT< std::vector< reco::FFTAnyJet< reco::GenJet > > > input_genjet_token_
 
edm::EDGetTokenT< reco::FFTJetPileupSummaryinput_pusummary_token_
 
edm::EDGetTokenT< reco::PattRecoTree< fftjetcms::Real, reco::PattRecoPeak< fftjetcms::Real > > > input_recotree_token_
 
const bool isCrisp
 
unsigned iterationsPerformed
 
std::vector< RecoFFTJetiterJets
 
std::vector< fftjet::Peak > iterPreclusters
 
std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
 
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
 
bool loadPileupFromDB
 
const unsigned maxInitialPreclusters
 
const unsigned maxIterations
 
unsigned maxLevel
 
const double maxStableScale
 
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
 
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
 
std::vector< fftjet::AbsKernel2d * > memFcns2dVec
 
unsigned minLevel
 
const double minStableScale
 
const edm::ParameterSet myConfiguration
 
const unsigned nClustersRequested
 
const unsigned nJetsRequiredToConverge
 
std::vector< SparseTree::NodeId > nodes
 
const double noiseLevel
 
std::vector< unsigned > occupancy
 
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
 
std::vector< fftjetcms::VectorLikepileup
 
std::unique_ptr< fftjetcms::AbsPileupCalculatorpileupDensityCalc
 
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
 
const edm::InputTag pileupLabel
 
std::string pileupTableCategory
 
std::string pileupTableName
 
std::string pileupTableRecord
 
std::vector< fftjet::Peak > preclusters
 
std::unique_ptr< RecoAlgrecoAlg
 
std::vector< RecoFFTJetrecoJets
 
const std::string recombinationAlgorithm
 
const double recombinationDataCutoff
 
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
 
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
 
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
 
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
 
Resolution resolution
 
const bool resumConstituents
 
const bool reuseExistingGrid
 
SparseTree sparseTree
 
const double stabilityAlpha
 
const bool subtractPileup
 
const bool subtractPileupAs4Vec
 
std::vector< double > thresholds
 
const edm::InputTag treeLabel
 
fftjetcms::VectorLike unclustered
 
const double unlikelyBgWeight
 
double unused
 
unsigned usedLevel
 
const bool useGriddedAlgorithm
 

Additional Inherited Members

- Protected Attributes inherited from fftjetcms::FFTJetInterface
const AnomalousTower anomalous
 
std::vector< unsigned > candidateIndex
 
const bool doPVCorrection
 
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
 
const std::vector< double > etaDependentMagnutideFactors
 
std::vector< fftjetcms::VectorLikeeventData
 
edm::Handle< reco::CandidateViewinputCollection
 
const edm::InputTag inputLabel
 
const JetType jetType
 
const std::string outputLabel
 
const edm::InputTag srcPVs
 

Detailed Description

Description: makes jets using FFTJet clustering tree

Implementation: [Notes on implementation]

Description: makes jets using FFTJet clustering tree

Implementation: If you want to change the jet algorithm functionality (for example, by providing your own jet membership function), derive from this class and override the appropriate parser method (for example, parse_jetMembershipFunction). At the end of your own parser, don't forget to call the parser of the base class in order to get the default behavior when your special configuration is not provided (this is known as the "chain-of-responsibility" design pattern). If you also need to override "beginJob" and/or "produce" methods, the first thing to do in your method is to call the corresponding method of this base.

Definition at line 77 of file FFTJetProducer.h.

Member Typedef Documentation

typedef fftjet::AbsRecombinationAlg<fftjetcms::Real, fftjetcms::VectorLike, fftjetcms::BgData> FFTJetProducer::GridAlg
private

Definition at line 172 of file FFTJetProducer.h.

typedef fftjet::AbsVectorRecombinationAlg<fftjetcms::VectorLike, fftjetcms::BgData> FFTJetProducer::RecoAlg
private

Definition at line 171 of file FFTJetProducer.h.

typedef fftjet::RecombinedJet<fftjetcms::VectorLike> FFTJetProducer::RecoFFTJet

Definition at line 79 of file FFTJetProducer.h.

typedef fftjet::SparseClusteringTree<fftjet::Peak, long> FFTJetProducer::SparseTree

Definition at line 80 of file FFTJetProducer.h.

Member Enumeration Documentation

Enumerator
RESOLUTION 
CONSTITUENTS_RESUMMED 
PILEUP_CALCULATED 
PILEUP_SUBTRACTED_4VEC 
PILEUP_SUBTRACTED_PT 

Definition at line 85 of file FFTJetProducer.h.

Constructor & Destructor Documentation

FFTJetProducer::FFTJetProducer ( const edm::ParameterSet ps)
explicit

Definition at line 113 of file FFTJetProducer.cc.

References SiStripOfflineCRack_cfg::alias, assignConstituents, fftjetcms::FFTJetInterface::checkConfig(), Exception, fftjetcms::fftjet_ScaleSet_parser(), genJetsLabel, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), iniScales, input_energyflow_token_, input_genjet_token_, input_pusummary_token_, input_recotree_token_, jet_type_switch, makeProduces(), fftjetcms::FFTJetInterface::outputLabel, pileupLabel, resumConstituents, AlCaHLTBitMon_QueryRunRegistry::string, and treeLabel.

114  : FFTJetInterface(ps),
115  myConfiguration(ps),
119  init_param(unsigned, maxIterations),
125  init_param(bool, subtractPileup),
128  init_param(double, fixedScale),
129  init_param(double, minStableScale),
130  init_param(double, maxStableScale),
131  init_param(double, stabilityAlpha),
132  init_param(double, noiseLevel),
133  init_param(unsigned, nClustersRequested),
134  init_param(double, gridScanMaxEta),
136  init_param(bool, isCrisp),
137  init_param(double, unlikelyBgWeight),
146 
147  minLevel(0),
148  maxLevel(0),
149  usedLevel(0),
150  unused(0.0),
152  constituents(200) {
153  // Check that the settings make sense
155  throw cms::Exception("FFTJetBadConfig") << "Can't resum constituents if they are not assigned" << std::endl;
156 
157  produces<reco::FFTJetProducerSummary>(outputLabel);
160 
161  // Build the set of pattern recognition scales.
162  // This is needed in order to read the clustering tree
163  // from the event record.
165  checkConfig(iniScales, "invalid set of scales");
166  std::sort(iniScales->begin(), iniScales->end(), std::greater<double>());
167 
169  consumes<reco::PattRecoTree<fftjetcms::Real, reco::PattRecoPeak<fftjetcms::Real> > >(treeLabel);
170  input_genjet_token_ = consumes<std::vector<reco::FFTAnyJet<reco::GenJet> > >(genJetsLabel);
171  input_energyflow_token_ = consumes<reco::DiscretizedEnergyFlow>(treeLabel);
172  input_pusummary_token_ = consumes<reco::FFTJetPileupSummary>(pileupLabel);
173 
174  // Most of the configuration has to be performed inside
175  // the "beginJob" method. This is because chaining of the
176  // parsers between this base class and the derived classes
177  // can not work from the constructor of the base class.
178 }
std::vector< std::vector< reco::CandidatePtr > > constituents
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned iterationsPerformed
const bool useGriddedAlgorithm
static Resolution parse_resolution(const std::string &name)
const bool resumConstituents
const double gridScanMaxEta
const std::string recombinationAlgorithm
const double fixedScale
const bool subtractPileupAs4Vec
void checkConfig(const Ptr &ptr, const char *message)
const double unlikelyBgWeight
void makeProduces(const std::string &alias, const std::string &tag)
const bool subtractPileup
const unsigned nJetsRequiredToConverge
Resolution resolution
const bool isCrisp
const double recombinationDataCutoff
const double minStableScale
const double maxStableScale
#define init_param(type, varname)
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
unsigned usedLevel
const double noiseLevel
std::string pileupTableRecord
std::string pileupTableName
const bool calculatePileup
const bool assignConstituents
const edm::InputTag treeLabel
const edm::InputTag genJetsLabel
const edm::ParameterSet myConfiguration
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > input_energyflow_token_
edm::EDGetTokenT< reco::FFTJetPileupSummary > input_pusummary_token_
const double stabilityAlpha
const unsigned maxInitialPreclusters
std::string pileupTableCategory
const double convergenceDistance
edm::EDGetTokenT< std::vector< reco::FFTAnyJet< reco::GenJet > > > input_genjet_token_
const edm::InputTag pileupLabel
#define jet_type_switch(method, arg1, arg2)
std::unique_ptr< std::vector< double > > fftjet_ScaleSet_parser(const edm::ParameterSet &ps)
const std::string outputLabel
const unsigned maxIterations
FFTJetProducer::~FFTJetProducer ( )
override

Definition at line 180 of file FFTJetProducer.cc.

180 {}
FFTJetProducer::FFTJetProducer ( )
privatedelete
FFTJetProducer::FFTJetProducer ( const FFTJetProducer )
privatedelete

Member Function Documentation

void FFTJetProducer::assignMembershipFunctions ( std::vector< fftjet::Peak > *  preclusters)
protectedvirtual

Definition at line 796 of file FFTJetProducer.cc.

Referenced by produce().

796 {}
void FFTJetProducer::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 799 of file FFTJetProducer.cc.

References assignConstituents, bgMembershipFunction, buildGridAlg(), calculatePileup, fftjetcms::FFTJetInterface::checkConfig(), fftjetcms::FFTJetInterface::energyFlow, Exception, fftjetcms::fftjet_Grid2d_parser(), edm::ParameterSet::getParameter(), isCrisp, jetDistanceCalc, jetMembershipFunction, loadPileupFromDB, maxIterations, memberFactorCalcJet, memberFactorCalcPeak, myConfiguration, parse_bgMembershipFunction(), parse_jetDistanceCalc(), parse_jetMembershipFunction(), parse_memberFactorCalcJet(), parse_memberFactorCalcPeak(), parse_peakSelector(), parse_pileupDensityCalc(), parse_recoScaleCalcJet(), parse_recoScaleCalcPeak(), parse_recoScaleRatioCalcJet(), parse_recoScaleRatioCalcPeak(), peakSelector, VtxSmearedParameters_cfi::Phi, pileupDensityCalc, pileupEnergyFlow, recoAlg, recombinationAlgorithm, recoScaleCalcJet, recoScaleCalcPeak, recoScaleRatioCalcJet, recoScaleRatioCalcPeak, reuseExistingGrid, unlikelyBgWeight, and useGriddedAlgorithm.

799  {
801 
802  // Parse the peak selector definition
804  checkConfig(peakSelector, "invalid peak selector");
805 
807  checkConfig(jetMembershipFunction, "invalid jet membership function");
808 
810  checkConfig(bgMembershipFunction, "invalid noise membership function");
811 
812  // Build the energy recombination algorithm
813  if (!useGriddedAlgorithm) {
814  fftjet::DefaultVectorRecombinationAlgFactory<VectorLike, BgData, VBuilder> factory;
815  if (factory[recombinationAlgorithm] == nullptr)
816  throw cms::Exception("FFTJetBadConfig")
817  << "Invalid vector recombination algorithm \"" << recombinationAlgorithm << "\"" << std::endl;
818  recoAlg = std::unique_ptr<RecoAlg>(factory[recombinationAlgorithm]->create(jetMembershipFunction.get(),
819  &VectorLike::Et,
820  &VectorLike::Eta,
822  bgMembershipFunction.get(),
824  isCrisp,
825  false,
827  } else if (!reuseExistingGrid) {
828  energyFlow = fftjet_Grid2d_parser(ps.getParameter<edm::ParameterSet>("GridConfiguration"));
829  checkConfig(energyFlow, "invalid discretization grid");
830  buildGridAlg();
831  }
832 
833  // Create the grid subsequently used for pile-up subtraction
834  if (calculatePileup) {
835  pileupEnergyFlow = fftjet_Grid2d_parser(ps.getParameter<edm::ParameterSet>("PileupGridConfiguration"));
836  checkConfig(pileupEnergyFlow, "invalid pileup density grid");
837 
838  if (!loadPileupFromDB) {
840  checkConfig(pileupDensityCalc, "invalid pile-up density calculator");
841  }
842  }
843 
844  // Parse the calculator of the recombination scale
847  "invalid spec for the "
848  "reconstruction scale calculator from peaks");
849 
850  // Parse the calculator of the recombination scale ratio
853  "invalid spec for the "
854  "reconstruction scale ratio calculator from peaks");
855 
856  // Calculator for the membership function factor
859  "invalid spec for the "
860  "membership function factor calculator from peaks");
861 
862  if (maxIterations > 1) {
863  // We are going to run iteratively. Make required objects.
866  "invalid spec for the "
867  "reconstruction scale calculator from jets");
868 
871  "invalid spec for the "
872  "reconstruction scale ratio calculator from jets");
873 
876  "invalid spec for the "
877  "membership function factor calculator from jets");
878 
881  "invalid spec for the "
882  "jet distance calculator");
883  }
884 }
virtual std::unique_ptr< fftjet::ScaleSpaceKernel > parse_jetMembershipFunction(const edm::ParameterSet &)
std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
const bool useGriddedAlgorithm
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
const std::string recombinationAlgorithm
virtual std::unique_ptr< fftjetcms::AbsBgFunctor > parse_bgMembershipFunction(const edm::ParameterSet &)
void checkConfig(const Ptr &ptr, const char *message)
const double unlikelyBgWeight
std::unique_ptr< fftjet::Grid2d< Real > > fftjet_Grid2d_parser(const edm::ParameterSet &ps)
const bool isCrisp
const bool reuseExistingGrid
virtual std::unique_ptr< fftjetcms::AbsPileupCalculator > parse_pileupDensityCalc(const edm::ParameterSet &ps)
std::unique_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleCalcJet(const edm::ParameterSet &)
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleRatioCalcPeak(const edm::ParameterSet &)
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
const bool calculatePileup
const bool assignConstituents
const edm::ParameterSet myConfiguration
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleRatioCalcJet(const edm::ParameterSet &)
std::unique_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
virtual std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > parse_peakSelector(const edm::ParameterSet &)
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
std::unique_ptr< RecoAlg > recoAlg
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_memberFactorCalcPeak(const edm::ParameterSet &)
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleCalcPeak(const edm::ParameterSet &)
const unsigned maxIterations
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_memberFactorCalcJet(const edm::ParameterSet &)
virtual std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > parse_jetDistanceCalc(const edm::ParameterSet &)
void FFTJetProducer::buildGridAlg ( )
private

Definition at line 344 of file FFTJetProducer.cc.

References assignConstituents, bgMembershipFunction, fftjetcms::FFTJetInterface::energyFlow, Exception, gridAlg, gridScanMaxEta, isCrisp, jetMembershipFunction, recombinationAlgorithm, recombinationDataCutoff, and unlikelyBgWeight.

Referenced by beginJob(), and produce().

344  {
345  int minBin = energyFlow->getEtaBin(-gridScanMaxEta);
346  if (minBin < 0)
347  minBin = 0;
348  int maxBin = energyFlow->getEtaBin(gridScanMaxEta) + 1;
349  if (maxBin < 0)
350  maxBin = 0;
351 
352  fftjet::DefaultRecombinationAlgFactory<Real, VectorLike, BgData, VBuilder> factory;
353  if (factory[recombinationAlgorithm] == nullptr)
354  throw cms::Exception("FFTJetBadConfig")
355  << "Invalid grid recombination algorithm \"" << recombinationAlgorithm << "\"" << std::endl;
356  gridAlg = std::unique_ptr<GridAlg>(factory[recombinationAlgorithm]->create(jetMembershipFunction.get(),
357  bgMembershipFunction.get(),
360  isCrisp,
361  false,
363  minBin,
364  maxBin));
365 }
const double gridScanMaxEta
const std::string recombinationAlgorithm
const double unlikelyBgWeight
std::unique_ptr< GridAlg > gridAlg
const bool isCrisp
const double recombinationDataCutoff
std::unique_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
const bool assignConstituents
bool FFTJetProducer::checkConvergence ( const std::vector< RecoFFTJet > &  previousIterResult,
std::vector< RecoFFTJet > &  thisIterResult 
)
private

Definition at line 386 of file FFTJetProducer.cc.

References convergenceDistance, ztail::d, mps_fire::i, jetDistanceCalc, and GetRecoTauVFromDQM_MC_cff::next.

Referenced by iterateJetReconstruction().

386  {
387  fftjet::Functor2<double, RecoFFTJet, RecoFFTJet>& distanceCalc(*jetDistanceCalc);
388 
389  const unsigned nJets = previous.size();
390  if (nJets != nextSet.size())
391  return false;
392 
393  const RecoFFTJet* prev = &previous[0];
394  RecoFFTJet* next = &nextSet[0];
395 
396  // Calculate convergence distances for all jets
397  bool converged = true;
398  for (unsigned i = 0; i < nJets; ++i) {
399  const double d = distanceCalc(prev[i], next[i]);
400  next[i].setConvergenceDistance(d);
401  if (i < nJetsRequiredToConverge && d > convergenceDistance)
402  converged = false;
403  }
404 
405  return converged;
406 }
std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
fftjet::RecombinedJet< VectorLike > RecoFFTJet
d
Definition: ztail.py:151
const double convergenceDistance
void FFTJetProducer::determineGriddedConstituents ( )
private

Definition at line 475 of file FFTJetProducer.cc.

References fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, g, gridAlg, mps_fire::i, fftjetcms::FFTJetInterface::inputCollection, B2GTnPMonitor_cfi::item, HLT_2018_cff::nEta, HLT_2018_cff::nPhi, edm::View< T >::ptrAt(), and recoJets.

Referenced by produce().

475  {
476  const unsigned nJets = recoJets.size();
477  const unsigned* clusterMask = gridAlg->getClusterMask();
478  const int nEta = gridAlg->getLastNEta();
479  const int nPhi = gridAlg->getLastNPhi();
480  const fftjet::Grid2d<Real>& g(*energyFlow);
481 
482  const unsigned nInputs = eventData.size();
483  const VectorLike* inp = nInputs ? &eventData[0] : nullptr;
484  const unsigned* candIdx = nInputs ? &candidateIndex[0] : nullptr;
485  for (unsigned i = 0; i < nInputs; ++i) {
486  const VectorLike& item(inp[i]);
487  const int iPhi = g.getPhiBin(item.Phi());
488  const int iEta = g.getEtaBin(item.Eta());
489  const unsigned mask = iEta >= 0 && iEta < nEta ? clusterMask[iEta * nPhi + iPhi] : 0;
490  assert(mask <= nJets);
491  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
492  }
493 }
std::vector< std::vector< reco::CandidatePtr > > constituents
edm::Handle< reco::CandidateView > inputCollection
Ptr< value_type > ptrAt(size_type i) const
std::vector< RecoFFTJet > recoJets
std::unique_ptr< GridAlg > gridAlg
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< unsigned > candidateIndex
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
math::XYZTLorentzVector VectorLike
std::vector< fftjetcms::VectorLike > eventData
void FFTJetProducer::determinePileup ( )
private

Definition at line 987 of file FFTJetProducer.cc.

References cellCountsVec, HLT_2018_cff::dEta, doubleBuf, HLT_2018_cff::dPhi, PVValHelper::eta, f, g, mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, isCrisp, metsig::jet, jetMembershipFunction, reco::btau::jetPhi, M_PI, memberFactorCalcJet, memFcns2dVec, HLT_2018_cff::nEta, HLT_2018_cff::nPhi, pileup, pileupEnergyFlow, recoJets, recoScaleCalcJet, recoScaleRatioCalcJet, and mitigatedMETSequence_cff::U.

Referenced by produce().

987  {
988  // This function works with crisp clustering only
989  if (!isCrisp)
990  assert(!"Pile-up subtraction for fuzzy clustering "
991  "is not implemented yet");
992 
993  // Clear the pileup vector
994  const unsigned nJets = recoJets.size();
995  pileup.resize(nJets);
996  if (nJets == 0)
997  return;
998  const VectorLike zero;
999  for (unsigned i = 0; i < nJets; ++i)
1000  pileup[i] = zero;
1001 
1002  // Pileup energy flow grid
1003  const fftjet::Grid2d<Real>& g(*pileupEnergyFlow);
1004  const unsigned nEta = g.nEta();
1005  const unsigned nPhi = g.nPhi();
1006  const double cellArea = g.etaBinWidth() * g.phiBinWidth();
1007 
1008  // Various calculators
1009  fftjet::Functor1<double, RecoFFTJet>& scaleCalc(*recoScaleCalcJet);
1010  fftjet::Functor1<double, RecoFFTJet>& ratioCalc(*recoScaleRatioCalcJet);
1011  fftjet::Functor1<double, RecoFFTJet>& factorCalc(*memberFactorCalcJet);
1012 
1013  // Make sure we have enough memory
1014  memFcns2dVec.resize(nJets);
1015  fftjet::AbsKernel2d** memFcns2d = &memFcns2dVec[0];
1016 
1017  doubleBuf.resize(nJets * 4U + nJets * nPhi);
1018  double* recoScales = &doubleBuf[0];
1019  double* recoScaleRatios = recoScales + nJets;
1020  double* memFactors = recoScaleRatios + nJets;
1021  double* dEta = memFactors + nJets;
1022  double* dPhiBuf = dEta + nJets;
1023 
1024  cellCountsVec.resize(nJets);
1025  unsigned* cellCounts = &cellCountsVec[0];
1026 
1027  // Go over jets and collect the necessary info
1028  for (unsigned ijet = 0; ijet < nJets; ++ijet) {
1029  const RecoFFTJet& jet(recoJets[ijet]);
1030  const fftjet::Peak& peak(jet.precluster());
1031 
1032  // Make sure we are using 2-d membership functions.
1033  // Pile-up subtraction scheme for 3-d functions should be different.
1034  fftjet::AbsMembershipFunction* m3d = dynamic_cast<fftjet::AbsMembershipFunction*>(peak.membershipFunction());
1035  if (m3d == nullptr)
1036  m3d = dynamic_cast<fftjet::AbsMembershipFunction*>(jetMembershipFunction.get());
1037  if (m3d) {
1038  assert(!"Pile-up subtraction for 3-d membership functions "
1039  "is not implemented yet");
1040  } else {
1041  fftjet::AbsKernel2d* m2d = dynamic_cast<fftjet::AbsKernel2d*>(peak.membershipFunction());
1042  if (m2d == nullptr)
1043  m2d = dynamic_cast<fftjet::AbsKernel2d*>(jetMembershipFunction.get());
1044  assert(m2d);
1045  memFcns2d[ijet] = m2d;
1046  }
1047  recoScales[ijet] = scaleCalc(jet);
1048  recoScaleRatios[ijet] = ratioCalc(jet);
1049  memFactors[ijet] = factorCalc(jet);
1050  cellCounts[ijet] = 0U;
1051 
1052  const double jetPhi = jet.vec().Phi();
1053  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
1054  double dphi = g.phiBinCenter(iphi) - jetPhi;
1055  while (dphi > M_PI)
1056  dphi -= (2.0 * M_PI);
1057  while (dphi < -M_PI)
1058  dphi += (2.0 * M_PI);
1059  dPhiBuf[iphi * nJets + ijet] = dphi;
1060  }
1061  }
1062 
1063  // Go over all grid points and integrate
1064  // the pile-up energy density
1065  VBuilder vMaker;
1066  for (unsigned ieta = 0; ieta < nEta; ++ieta) {
1067  const double eta(g.etaBinCenter(ieta));
1068  const Real* databuf = g.data() + ieta * nPhi;
1069 
1070  // Figure out dEta for each jet
1071  for (unsigned ijet = 0; ijet < nJets; ++ijet)
1072  dEta[ijet] = eta - recoJets[ijet].vec().Eta();
1073 
1074  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
1075  double maxW(0.0);
1076  unsigned maxWJet(nJets);
1077  const double* dPhi = dPhiBuf + iphi * nJets;
1078 
1079  for (unsigned ijet = 0; ijet < nJets; ++ijet) {
1080  if (recoScaleRatios[ijet] > 0.0)
1081  memFcns2d[ijet]->setScaleRatio(recoScaleRatios[ijet]);
1082  const double f = memFactors[ijet] * (*memFcns2d[ijet])(dEta[ijet], dPhi[ijet], recoScales[ijet]);
1083  if (f > maxW) {
1084  maxW = f;
1085  maxWJet = ijet;
1086  }
1087  }
1088 
1089  if (maxWJet < nJets) {
1090  pileup[maxWJet] += vMaker(cellArea * databuf[iphi], eta, g.phiBinCenter(iphi));
1091  cellCounts[maxWJet]++;
1092  }
1093  }
1094  }
1095 }
std::vector< fftjetcms::VectorLike > pileup
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
std::vector< double > doubleBuf
std::vector< fftjet::AbsKernel2d * > memFcns2dVec
std::vector< RecoFFTJet > recoJets
const bool isCrisp
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
fftjet::RecombinedJet< VectorLike > RecoFFTJet
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
math::XYZTLorentzVector VectorLike
double f[11][100]
std::vector< unsigned > cellCountsVec
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
#define M_PI
double Real
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
void FFTJetProducer::determinePileupDensityFromConfig ( const edm::Event iEvent,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 918 of file FFTJetProducer.cc.

References fastSimProducer_cff::density, PVValHelper::eta, g, edm::Event::getByToken(), LEDCalibrationChannels::ieta, input_pusummary_token_, LEDCalibrationChannels::iphi, fftjetcms::AbsPileupCalculator::isPhiDependent(), HLT_2018_cff::nEta, HLT_2018_cff::nPhi, phi, pileupDensityCalc, alignCSCRings::s, and edmLumisInFiles::summary.

Referenced by produce().

919  {
921  iEvent.getByToken(input_pusummary_token_, summary);
922 
923  const reco::FFTJetPileupSummary& s(*summary);
925  const bool phiDependent = calc.isPhiDependent();
926 
927  fftjet::Grid2d<Real>& g(*density);
928  const unsigned nEta = g.nEta();
929  const unsigned nPhi = g.nPhi();
930 
931  for (unsigned ieta = 0; ieta < nEta; ++ieta) {
932  const double eta(g.etaBinCenter(ieta));
933 
934  if (phiDependent) {
935  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
936  const double phi(g.phiBinCenter(iphi));
937  g.uncheckedSetBin(ieta, iphi, calc(eta, phi, s));
938  }
939  } else {
940  const double pil = calc(eta, 0.0, s);
941  for (unsigned iphi = 0; iphi < nPhi; ++iphi)
942  g.uncheckedSetBin(ieta, iphi, pil);
943  }
944  }
945 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
Summary info for pile-up determined by Gaussian filtering.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
edm::EDGetTokenT< reco::FFTJetPileupSummary > input_pusummary_token_
std::unique_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
void FFTJetProducer::determinePileupDensityFromDB ( const edm::Event iEvent,
const edm::EventSetup iSetup,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 947 of file FFTJetProducer.cc.

References fastSimProducer_cff::density, PVValHelper::eta, f, g, edm::Event::getByToken(), h, LEDCalibrationChannels::ieta, input_pusummary_token_, StaticFFTJetRcdMapper< Mapper >::instance(), LEDCalibrationChannels::iphi, HLT_2018_cff::nEta, HLT_2018_cff::nPhi, reco::FFTJetPileupSummary::pileupRho(), pileupTableCategory, pileupTableName, pileupTableRecord, rho, edmLumisInFiles::summary, and mitigatedMETSequence_cff::U.

Referenced by produce().

949  {
952  std::shared_ptr<npstat::StorableMultivariateFunctor> f = (*h)[pileupTableCategory][pileupTableName];
953 
955  iEvent.getByToken(input_pusummary_token_, summary);
956 
957  const float rho = summary->pileupRho();
958  const bool phiDependent = f->minDim() == 3U;
959 
960  fftjet::Grid2d<Real>& g(*density);
961  const unsigned nEta = g.nEta();
962  const unsigned nPhi = g.nPhi();
963 
964  double functorArg[3] = {0.0, 0.0, 0.0};
965  if (phiDependent)
966  functorArg[2] = rho;
967  else
968  functorArg[1] = rho;
969 
970  for (unsigned ieta = 0; ieta < nEta; ++ieta) {
971  const double eta(g.etaBinCenter(ieta));
972  functorArg[0] = eta;
973 
974  if (phiDependent) {
975  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
976  functorArg[1] = g.phiBinCenter(iphi);
977  g.uncheckedSetBin(ieta, iphi, (*f)(functorArg, 3U));
978  }
979  } else {
980  const double pil = (*f)(functorArg, 2U);
981  for (unsigned iphi = 0; iphi < nPhi; ++iphi)
982  g.uncheckedSetBin(ieta, iphi, pil);
983  }
984  }
985 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double f[11][100]
std::string pileupTableRecord
std::string pileupTableName
edm::EDGetTokenT< reco::FFTJetPileupSummary > input_pusummary_token_
std::string pileupTableCategory
static const Mapper & instance()
void FFTJetProducer::determineVectorConstituents ( )
private

Definition at line 495 of file FFTJetProducer.cc.

References fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::eventData, mps_fire::i, fftjetcms::FFTJetInterface::inputCollection, edm::View< T >::ptrAt(), recoAlg, and recoJets.

Referenced by produce().

495  {
496  const unsigned nJets = recoJets.size();
497  const unsigned* clusterMask = recoAlg->getClusterMask();
498  const unsigned maskLength = recoAlg->getLastNData();
499  assert(maskLength == eventData.size());
500 
501  const unsigned* candIdx = maskLength ? &candidateIndex[0] : nullptr;
502  for (unsigned i = 0; i < maskLength; ++i) {
503  // In FFTJet, the mask value of 0 corresponds to unclustered
504  // energy. We will do the same here. Jet numbers are therefore
505  // shifted by 1 wrt constituents vector, and constituents[1]
506  // corresponds to jet number 0.
507  const unsigned mask = clusterMask[i];
508  assert(mask <= nJets);
509  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
510  }
511 }
std::vector< std::vector< reco::CandidatePtr > > constituents
edm::Handle< reco::CandidateView > inputCollection
Ptr< value_type > ptrAt(size_type i) const
std::vector< RecoFFTJet > recoJets
std::vector< unsigned > candidateIndex
std::unique_ptr< RecoAlg > recoAlg
std::vector< fftjetcms::VectorLike > eventData
void FFTJetProducer::endJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 1098 of file FFTJetProducer.cc.

References DEFINE_FWK_MODULE.

1098 {}
void FFTJetProducer::genJetPreclusters ( const SparseTree tree,
edm::Event iEvent,
const edm::EventSetup ,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelector,
std::vector< fftjet::Peak > *  preclusters 
)
protectedvirtual

Definition at line 201 of file FFTJetProducer.cc.

References edm::Event::getByToken(), mps_fire::i, input, input_genjet_token_, SimL1EmulatorRepack_GT2_cff::InputCollection, metsig::jet, fftjetcms::jetFromStorable(), AlCaHLTBitMon_ParallelJobs::p, resolution, and Scenarios_cff::scale.

Referenced by produce().

205  {
206  typedef reco::FFTAnyJet<reco::GenJet> InputJet;
207  typedef std::vector<InputJet> InputCollection;
208 
210  iEvent.getByToken(input_genjet_token_, input);
211 
212  const unsigned sz = input->size();
213  preclusters->reserve(sz);
214  for (unsigned i = 0; i < sz; ++i) {
215  const RecoFFTJet& jet(jetFromStorable((*input)[i].getFFTSpecific()));
216  fftjet::Peak p(jet.precluster());
217  const double scale(p.scale());
218  p.setEtaPhi(jet.vec().Eta(), jet.vec().Phi());
219  p.setMagnitude(jet.vec().Pt() / scale / scale);
220  p.setStatus(resolution);
221  if (peakSelect(p))
222  preclusters->push_back(p);
223  }
224 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
fftjet::RecombinedJet< VectorLike > jetFromStorable(const reco::FFTJet< Real > &jet)
Definition: jetConverters.h:65
Resolution resolution
std::vector< fftjet::Peak > preclusters
static std::string const input
Definition: EdmProvDump.cc:48
fftjet::RecombinedJet< VectorLike > RecoFFTJet
Implements inheritance relationships for FFTJet jets.
Definition: FFTAnyJet.h:16
edm::EDGetTokenT< std::vector< reco::FFTAnyJet< reco::GenJet > > > input_genjet_token_
unsigned FFTJetProducer::iterateJetReconstruction ( )
private

Definition at line 408 of file FFTJetProducer.cc.

References checkConvergence(), fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, Exception, gridAlg, mps_fire::i, iterJets, iterPreclusters, metsig::jet, singleTopDQM_cfi::jets, maxIterations, memberFactorCalcJet, noiseLevel, AlCaHLTBitMon_ParallelJobs::p, preclusters, recoAlg, recoJets, recoScaleCalcJet, recoScaleRatioCalcJet, removeFakePreclusters(), mps_update::status, mitigatedMETSequence_cff::U, unclustered, unused, and useGriddedAlgorithm.

Referenced by produce().

408  {
409  fftjet::Functor1<double, RecoFFTJet>& scaleCalc(*recoScaleCalcJet);
410  fftjet::Functor1<double, RecoFFTJet>& ratioCalc(*recoScaleRatioCalcJet);
411  fftjet::Functor1<double, RecoFFTJet>& factorCalc(*memberFactorCalcJet);
412 
413  unsigned nJets = recoJets.size();
414  unsigned iterNum = 1U;
415  bool converged = false;
416  for (; iterNum < maxIterations && !converged; ++iterNum) {
417  // Recreate the vector of preclusters using the jets
418  const RecoFFTJet* jets = &recoJets[0];
419  iterPreclusters.clear();
420  iterPreclusters.reserve(nJets);
421  for (unsigned i = 0; i < nJets; ++i) {
422  const RecoFFTJet& jet(jets[i]);
423  fftjet::Peak p(jet.precluster());
424  p.setEtaPhi(jet.vec().Eta(), jet.vec().Phi());
425  p.setRecoScale(scaleCalc(jet));
426  p.setRecoScaleRatio(ratioCalc(jet));
427  p.setMembershipFactor(factorCalc(jet));
428  iterPreclusters.push_back(p);
429  }
430 
431  // Run the algorithm
432  int status = 0;
435  else
437  if (status)
438  throw cms::Exception("FFTJetInterface") << "FFTJet algorithm failed" << std::endl;
439 
440  // As it turns out, it is possible, in very rare cases,
441  // to have iterJets.size() != nJets at this point
442 
443  // Figure out if the iterations have converged
444  converged = checkConvergence(recoJets, iterJets);
445 
446  // Prepare for the next cycle
447  iterJets.swap(recoJets);
448  nJets = recoJets.size();
449  }
450 
451  // Check that we have the correct number of preclusters
452  if (preclusters.size() != nJets) {
453  assert(nJets < preclusters.size());
455  assert(preclusters.size() == nJets);
456  }
457 
458  // Plug in the original precluster coordinates into the result
459  RecoFFTJet* jets = &recoJets[0];
460  for (unsigned i = 0; i < nJets; ++i) {
461  const fftjet::Peak& oldp(preclusters[i]);
462  jets[i].setPeakEtaPhi(oldp.eta(), oldp.phi());
463  }
464 
465  // If we have converged on the last cycle, the result
466  // would be indistinguishable from no convergence.
467  // Because of this, raise the counter by one to indicate
468  // the case when the convergence is not achieved.
469  if (!converged)
470  ++iterNum;
471 
472  return iterNum;
473 }
const bool useGriddedAlgorithm
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
std::vector< RecoFFTJet > recoJets
std::unique_ptr< GridAlg > gridAlg
std::vector< fftjet::Peak > preclusters
fftjet::RecombinedJet< VectorLike > RecoFFTJet
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
const double noiseLevel
std::vector< RecoFFTJet > iterJets
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
bool checkConvergence(const std::vector< RecoFFTJet > &previousIterResult, std::vector< RecoFFTJet > &thisIterResult)
std::unique_ptr< RecoAlg > recoAlg
std::vector< fftjetcms::VectorLike > eventData
fftjetcms::VectorLike unclustered
std::vector< fftjet::Peak > iterPreclusters
void removeFakePreclusters()
const unsigned maxIterations
bool FFTJetProducer::loadEnergyFlow ( const edm::Event iEvent,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  flow 
)
private

Definition at line 367 of file FFTJetProducer.cc.

References reco::DiscretizedEnergyFlow::data(), reco::DiscretizedEnergyFlow::etaMax(), reco::DiscretizedEnergyFlow::etaMin(), fftjetcommon_cfi::flow, edm::Event::getByToken(), input, input_energyflow_token_, reco::DiscretizedEnergyFlow::nEtaBins(), reco::DiscretizedEnergyFlow::nPhiBins(), reco::DiscretizedEnergyFlow::phiBin0Edge(), and reco::DiscretizedEnergyFlow::title().

Referenced by produce().

367  {
369  iEvent.getByToken(input_energyflow_token_, input);
370 
371  // Make sure that the grid is compatible with the stored one
372  bool rebuildGrid = flow.get() == nullptr;
373  if (!rebuildGrid)
374  rebuildGrid =
375  !(flow->nEta() == input->nEtaBins() && flow->nPhi() == input->nPhiBins() && flow->etaMin() == input->etaMin() &&
376  flow->etaMax() == input->etaMax() && flow->phiBin0Edge() == input->phiBin0Edge());
377  if (rebuildGrid) {
378  // We should not get here very often...
379  flow = std::unique_ptr<fftjet::Grid2d<Real> >(new fftjet::Grid2d<Real>(
380  input->nEtaBins(), input->etaMin(), input->etaMax(), input->nPhiBins(), input->phiBin0Edge(), input->title()));
381  }
382  flow->blockSet(input->data(), input->nEtaBins(), input->nPhiBins());
383  return rebuildGrid;
384 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
static std::string const input
Definition: EdmProvDump.cc:48
const double * data() const
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > input_energyflow_token_
template<class Real >
void FFTJetProducer::loadSparseTreeData ( const edm::Event iEvent)
private

Definition at line 186 of file FFTJetProducer.cc.

References edm::Event::getByToken(), fftjetcms::FFTJetInterface::getEventScale(), iniScales, input, input_recotree_token_, fftjetcms::sparsePeakTreeFromStorable(), and sparseTree.

186  {
188 
189  // Get the input
191  iEvent.getByToken(input_recotree_token_, input);
192 
193  if (!input->isSparse())
194  throw cms::Exception("FFTJetBadConfig") << "The stored clustering tree is not sparse" << std::endl;
195 
197  sparseTree.sortNodes();
198  fftjet::updateSplitMergeTimes(sparseTree, sparseTree.minScale(), sparseTree.maxScale());
199 }
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:20
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
static std::string const input
Definition: EdmProvDump.cc:48
edm::EDGetTokenT< reco::PattRecoTree< fftjetcms::Real, reco::PattRecoPeak< fftjetcms::Real > > > input_recotree_token_
std::unique_ptr< std::vector< double > > iniScales
void sparsePeakTreeFromStorable(const reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > &in, const std::vector< double > *scaleSetIfNotAdaptive, double completeEventScale, fftjet::SparseClusteringTree< fftjet::Peak, long > *out)
SparseTree sparseTree
template<typename T >
void FFTJetProducer::makeProduces ( const std::string &  alias,
const std::string &  tag 
)
private

Definition at line 106 of file FFTJetProducer.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by FFTJetProducer().

106  {
107  produces<std::vector<reco::FFTAnyJet<T> > >(tag).setBranchAlias(alias);
108 }
FFTJetProducer& FFTJetProducer::operator= ( const FFTJetProducer )
privatedelete
std::unique_ptr< AbsBgFunctor > FFTJetProducer::parse_bgMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 749 of file FFTJetProducer.cc.

References fftjetcms::fftjet_BgFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

749  {
750  return fftjet_BgFunctor_parser(ps.getParameter<edm::ParameterSet>("bgMembershipFunction"));
751 }
T getParameter(std::string const &) const
std::unique_ptr< AbsBgFunctor > fftjet_BgFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor2< double, FFTJetProducer::RecoFFTJet, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_jetDistanceCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 792 of file FFTJetProducer.cc.

References fftjetcms::fftjet_JetDistance_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

792  {
793  return fftjet_JetDistance_parser(ps.getParameter<edm::ParameterSet>("jetDistanceCalc"));
794 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor2< double, fftjet::RecombinedJet< VectorLike >, fftjet::RecombinedJet< VectorLike > > > fftjet_JetDistance_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::ScaleSpaceKernel > FFTJetProducer::parse_jetMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 744 of file FFTJetProducer.cc.

References fftjetcms::fftjet_MembershipFunction_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

744  {
745  return fftjet_MembershipFunction_parser(ps.getParameter<edm::ParameterSet>("jetMembershipFunction"));
746 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::ScaleSpaceKernel > fftjet_MembershipFunction_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_memberFactorCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 786 of file FFTJetProducer.cc.

References fftjetcms::fftjet_JetFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

787  {
788  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("memberFactorCalcJet"));
789 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_memberFactorCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 771 of file FFTJetProducer.cc.

References fftjetcms::fftjet_PeakFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

772  {
773  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("memberFactorCalcPeak"));
774 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > FFTJetProducer::parse_peakSelector ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 739 of file FFTJetProducer.cc.

References fftjetcms::fftjet_PeakSelector_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

739  {
740  return fftjet_PeakSelector_parser(ps.getParameter<edm::ParameterSet>("PeakSelectorConfiguration"));
741 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > fftjet_PeakSelector_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjetcms::AbsPileupCalculator > FFTJetProducer::parse_pileupDensityCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 760 of file FFTJetProducer.cc.

References fftjetcms::fftjet_PileupCalculator_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

760  {
761  return fftjet_PileupCalculator_parser(ps.getParameter<edm::ParameterSet>("pileupDensityCalc"));
762 }
T getParameter(std::string const &) const
std::unique_ptr< AbsPileupCalculator > fftjet_PileupCalculator_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 776 of file FFTJetProducer.cc.

References fftjetcms::fftjet_JetFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

777  {
778  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleCalcJet"));
779 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 754 of file FFTJetProducer.cc.

References fftjetcms::fftjet_PeakFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

755  {
756  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleCalcPeak"));
757 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleRatioCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 781 of file FFTJetProducer.cc.

References fftjetcms::fftjet_JetFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

782  {
783  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcJet"));
784 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleRatioCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 765 of file FFTJetProducer.cc.

References fftjetcms::fftjet_PeakFunctor_parser(), and edm::ParameterSet::getParameter().

Referenced by beginJob().

766  {
767  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcPeak"));
768 }
T getParameter(std::string const &) const
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
FFTJetProducer::Resolution FFTJetProducer::parse_resolution ( const std::string &  name)
static

Definition at line 90 of file FFTJetProducer.cc.

References Exception.

90  {
91  if (!name.compare("fixed"))
92  return FIXED;
93  else if (!name.compare("maximallyStable"))
94  return MAXIMALLY_STABLE;
95  else if (!name.compare("globallyAdaptive"))
96  return GLOBALLY_ADAPTIVE;
97  else if (!name.compare("locallyAdaptive"))
98  return LOCALLY_ADAPTIVE;
99  else if (!name.compare("fromGenJets"))
100  return FROM_GENJETS;
101  else
102  throw cms::Exception("FFTJetBadConfig") << "Invalid resolution specification \"" << name << "\"" << std::endl;
103 }
void FFTJetProducer::prepareRecombinationScales ( )
private

Definition at line 328 of file FFTJetProducer.cc.

References mps_fire::i, memberFactorCalcPeak, preclusters, recoScaleCalcPeak, and recoScaleRatioCalcPeak.

Referenced by produce().

328  {
329  const unsigned nClus = preclusters.size();
330  if (nClus) {
331  fftjet::Peak* clus = &preclusters[0];
332  fftjet::Functor1<double, fftjet::Peak>& scaleCalc(*recoScaleCalcPeak);
333  fftjet::Functor1<double, fftjet::Peak>& ratioCalc(*recoScaleRatioCalcPeak);
334  fftjet::Functor1<double, fftjet::Peak>& factorCalc(*memberFactorCalcPeak);
335 
336  for (unsigned i = 0; i < nClus; ++i) {
337  clus[i].setRecoScale(scaleCalc(clus[i]));
338  clus[i].setRecoScaleRatio(ratioCalc(clus[i]));
339  clus[i].setMembershipFactor(factorCalc(clus[i]));
340  }
341  }
342 }
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
std::vector< fftjet::Peak > preclusters
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
void FFTJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotected

Definition at line 637 of file FFTJetProducer.cc.

References assignConstituents, assignMembershipFunctions(), buildGridAlg(), calculatePileup, hitfit::clear(), constituents, determineGriddedConstituents(), determinePileup(), determinePileupDensityFromConfig(), determinePileupDensityFromDB(), determineVectorConstituents(), fftjetcms::FFTJetInterface::discretizeEnergyFlow(), fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, Exception, FROM_GENJETS, genJetPreclusters(), gridAlg, mps_fire::i, iEvent, iterateJetReconstruction(), iterationsPerformed, loadEnergyFlow(), fftjetcms::FFTJetInterface::loadInputCollection(), loadPileupFromDB, maxInitialPreclusters, maxIterations, noiseLevel, occupancy, peakSelector, pileup, pileupEnergyFlow, preclusters, prepareRecombinationScales(), recoAlg, recoJets, removeFakePreclusters(), resolution, reuseExistingGrid, saveResults(), selectPreclusters(), sparseTree, mps_update::status, fftjetcms::FFTJetInterface::storeInSinglePrecision(), mitigatedMETSequence_cff::U, unclustered, unused, and useGriddedAlgorithm.

637  {
638  // Load the clustering tree made by FFTJetPatRecoProducer
640  loadSparseTreeData<float>(iEvent);
641  else
642  loadSparseTreeData<double>(iEvent);
643 
644  // Do we need to load the candidate collection?
646  loadInputCollection(iEvent);
647 
648  // Do we need to have discretized energy flow?
649  if (useGriddedAlgorithm) {
650  if (reuseExistingGrid) {
651  if (loadEnergyFlow(iEvent, energyFlow))
652  buildGridAlg();
653  } else
655  }
656 
657  // Calculate cluster occupancy as a function of level number
658  sparseTree.occupancyInScaleSpace(*peakSelector, &occupancy);
659 
660  // Select the preclusters using the requested resolution scheme
661  preclusters.clear();
662  if (resolution == FROM_GENJETS)
664  else
666  if (preclusters.size() > maxInitialPreclusters) {
667  std::sort(preclusters.begin(), preclusters.end(), std::greater<fftjet::Peak>());
669  }
670 
671  // Prepare to run the jet recombination procedure
673 
674  // Assign membership functions to preclusters. If this function
675  // is not overriden in a derived class, default algorithm membership
676  // function will be used for every cluster.
678 
679  // Count the preclusters going in
680  unsigned nPreclustersFound = 0U;
681  const unsigned npre = preclusters.size();
682  for (unsigned i = 0; i < npre; ++i)
683  if (preclusters[i].membershipFactor() > 0.0)
684  ++nPreclustersFound;
685 
686  // Run the recombination algorithm once
687  int status = 0;
689  status = gridAlg->run(preclusters, *energyFlow, &noiseLevel, 1U, 1U, &recoJets, &unclustered, &unused);
690  else
692  if (status)
693  throw cms::Exception("FFTJetInterface") << "FFTJet algorithm failed (first iteration)" << std::endl;
694 
695  // If requested, iterate the jet recombination procedure
696  if (maxIterations > 1U && !recoJets.empty()) {
697  // It is possible to have a smaller number of jets than we had
698  // preclusters. Fake preclusters are possible, but for a good
699  // choice of pattern recognition kernel their presence should
700  // be infrequent. However, any fake preclusters will throw the
701  // iterative reconstruction off balance. Deal with the problem now.
702  const unsigned nJets = recoJets.size();
703  if (preclusters.size() != nJets) {
704  assert(nJets < preclusters.size());
706  }
708  } else
710 
711  // Determine jet constituents. FFTJet returns a map
712  // of constituents which is inverse to what we need here.
713  const unsigned nJets = recoJets.size();
714  if (constituents.size() <= nJets)
715  constituents.resize(nJets + 1U);
716  if (assignConstituents) {
717  for (unsigned i = 0; i <= nJets; ++i)
718  constituents[i].clear();
721  else
723  }
724 
725  // Figure out the pile-up
726  if (calculatePileup) {
727  if (loadPileupFromDB)
729  else
731  determinePileup();
732  assert(pileup.size() == recoJets.size());
733  }
734 
735  // Write out the results
736  saveResults(iEvent, iSetup, nPreclustersFound);
737 }
std::vector< std::vector< reco::CandidatePtr > > constituents
unsigned iterationsPerformed
const bool useGriddedAlgorithm
std::vector< fftjetcms::VectorLike > pileup
void saveResults(edm::Event &iEvent, const edm::EventSetup &, unsigned nPreclustersFound)
virtual void assignMembershipFunctions(std::vector< fftjet::Peak > *preclusters)
void loadInputCollection(const edm::Event &)
Resolution resolution
std::vector< RecoFFTJet > recoJets
std::unique_ptr< GridAlg > gridAlg
std::vector< unsigned > occupancy
std::vector< fftjet::Peak > preclusters
void determineVectorConstituents()
const bool reuseExistingGrid
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:151
const double noiseLevel
virtual void determinePileupDensityFromDB(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
unsigned iterateJetReconstruction()
const bool calculatePileup
const bool assignConstituents
bool storeInSinglePrecision() const
virtual void selectPreclusters(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
const unsigned maxInitialPreclusters
SparseTree sparseTree
void determineGriddedConstituents()
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
virtual void genJetPreclusters(const SparseTree &tree, edm::Event &, const edm::EventSetup &, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
bool loadEnergyFlow(const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &flow)
std::unique_ptr< RecoAlg > recoAlg
std::vector< fftjetcms::VectorLike > eventData
fftjetcms::VectorLike unclustered
virtual void determinePileupDensityFromConfig(const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
void removeFakePreclusters()
const unsigned maxIterations
void prepareRecombinationScales()
void FFTJetProducer::removeFakePreclusters ( )
private

Definition at line 886 of file FFTJetProducer.cc.

References mps_fire::i, iterPreclusters, fftjetcms::matchOneToOne(), preclusters, and recoJets.

Referenced by iterateJetReconstruction(), and produce().

886  {
887  // There are two possible reasons for fake preclusters:
888  // 1. Membership factor was set to 0
889  // 2. Genuine problem with pattern recognition
890  //
891  // Anyway, we need to match jets to preclusters and keep
892  // only those preclusters that have been matched
893  //
894  std::vector<int> matchTable;
895  const unsigned nmatched = matchOneToOne(recoJets, preclusters, JetToPeakDistance(), &matchTable);
896 
897  // Ensure that all jets have been matched.
898  // If not, we must have a bug somewhere.
899  assert(nmatched == recoJets.size());
900 
901  // Collect all matched preclusters
902  iterPreclusters.clear();
903  iterPreclusters.reserve(nmatched);
904  for (unsigned i = 0; i < nmatched; ++i)
905  iterPreclusters.push_back(preclusters[matchTable[i]]);
907 }
unsigned matchOneToOne(const std::vector< T1 > &v1, const std::vector< T2 > &v2, const DistanceCalculator &calc, std::vector< int > *matchFrom1To2, const double maxMatchingDistance=1.0e300)
Definition: matchOneToOne.h:38
std::vector< RecoFFTJet > recoJets
std::vector< fftjet::Peak > preclusters
std::vector< fftjet::Peak > iterPreclusters
void FFTJetProducer::saveResults ( edm::Event iEvent,
const edm::EventSetup iSetup,
unsigned  nPreclustersFound 
)
private

Definition at line 601 of file FFTJetProducer.cc.

References constituents, mps_fire::i, iterationsPerformed, jet_type_switch, maxIterations, maxLevel, fftjetcommon_cfi::maxScale, minLevel, fftjetcommon_cfi::minScale, occupancy, fftjetcms::FFTJetInterface::outputLabel, p4, edm::Event::put(), resumConstituents, sparseTree, thresholds, mitigatedMETSequence_cff::U, unclustered, unused, usedLevel, and writeJets().

Referenced by produce().

601  {
602  // Write recombined jets
603  jet_type_switch(writeJets, ev, iSetup);
604 
605  // Check if we should resum unclustered energy constituents
606  VectorLike unclusE(unclustered);
607  if (resumConstituents) {
608  VectorLike sum(0.0, 0.0, 0.0, 0.0);
609  const unsigned nCon = constituents[0].size();
610  const reco::CandidatePtr* cn = nCon ? &constituents[0][0] : nullptr;
611  for (unsigned i = 0; i < nCon; ++i)
612  sum += cn[i]->p4();
613  unclusE = sum;
614  }
615 
616  // Write the jet reconstruction summary
617  const double minScale = minLevel ? sparseTree.getScale(minLevel) : 0.0;
618  const double maxScale = maxLevel ? sparseTree.getScale(maxLevel) : 0.0;
619  const double scaleUsed = usedLevel ? sparseTree.getScale(usedLevel) : 0.0;
620 
621  ev.put(
622  std::make_unique<reco::FFTJetProducerSummary>(thresholds,
623  occupancy,
624  unclusE,
625  constituents[0],
626  unused,
627  minScale,
628  maxScale,
629  scaleUsed,
630  nPreclustersFound,
633  outputLabel);
634 }
std::vector< std::vector< reco::CandidatePtr > > constituents
unsigned iterationsPerformed
const bool resumConstituents
bool ev
std::vector< unsigned > occupancy
math::XYZTLorentzVector VectorLike
unsigned usedLevel
double p4[4]
Definition: TauolaWrapper.h:92
std::vector< double > thresholds
SparseTree sparseTree
void writeJets(edm::Event &iEvent, const edm::EventSetup &)
#define jet_type_switch(method, arg1, arg2)
const std::string outputLabel
fftjetcms::VectorLike unclustered
const unsigned maxIterations
void FFTJetProducer::selectPreclusters ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelector,
std::vector< fftjet::Peak > *  preclusters 
)
protectedvirtual

Definition at line 226 of file FFTJetProducer.cc.

References bsc_activity_cfg::clusters, mps_fire::i, nodes, resolution, selectTreeNodes(), and sparseTree.

Referenced by produce().

228  {
229  nodes.clear();
230  selectTreeNodes(tree, peakSelect, &nodes);
231 
232  // Fill out the vector of preclusters using the tree node ids
233  const unsigned nNodes = nodes.size();
234  const SparseTree::NodeId* pnodes = nNodes ? &nodes[0] : nullptr;
235  preclusters->reserve(nNodes);
236  for (unsigned i = 0; i < nNodes; ++i)
237  preclusters->push_back(sparseTree.uncheckedNode(pnodes[i]).getCluster());
238 
239  // Remember the node id in the precluster and set
240  // the status word to indicate the resolution scheme used
241  fftjet::Peak* clusters = nNodes ? &(*preclusters)[0] : nullptr;
242  for (unsigned i = 0; i < nNodes; ++i) {
243  clusters[i].setCode(pnodes[i]);
244  clusters[i].setStatus(resolution);
245  }
246 }
void selectTreeNodes(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelect, std::vector< SparseTree::NodeId > *nodes)
Resolution resolution
std::vector< fftjet::Peak > preclusters
SparseTree sparseTree
std::vector< SparseTree::NodeId > nodes
Definition: tree.py:1
void FFTJetProducer::selectTreeNodes ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelect,
std::vector< SparseTree::NodeId > *  nodes 
)
protected

Definition at line 248 of file FFTJetProducer.cc.

References ztail::d, dumpMFGeometry_cfg::delta, FIXED, fixedScale, GLOBALLY_ADAPTIVE, personalPlayback::level, LOCALLY_ADAPTIVE, MAXIMALLY_STABLE, maxLevel, maxStableScale, minLevel, minStableScale, dqmiodumpmetadata::n, nClustersRequested, occupancy, resolution, stabilityAlpha, TopDecayID::stable, thresholds, and usedLevel.

Referenced by selectPreclusters().

250  {
251  minLevel = maxLevel = usedLevel = 0;
252 
253  // Get the tree nodes which pass the cuts
254  // (according to the selected resolution strategy)
255  switch (resolution) {
256  case FIXED: {
257  usedLevel = tree.getLevel(fixedScale);
258  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
259  } break;
260 
261  case MAXIMALLY_STABLE: {
262  const unsigned minStartingLevel = maxStableScale > 0.0 ? tree.getLevel(maxStableScale) : 0;
263  const unsigned maxStartingLevel = minStableScale > 0.0 ? tree.getLevel(minStableScale) : UINT_MAX;
264 
265  if (tree.stableClusterCount(
266  peakSelect, &minLevel, &maxLevel, stabilityAlpha, minStartingLevel, maxStartingLevel)) {
267  usedLevel = (minLevel + maxLevel) / 2;
268  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
269  }
270  } break;
271 
272  case GLOBALLY_ADAPTIVE: {
273  const bool stable = tree.clusterCountLevels(nClustersRequested, peakSelect, &minLevel, &maxLevel);
274  if (minLevel || maxLevel) {
275  usedLevel = (minLevel + maxLevel) / 2;
276  if (!stable) {
277  const int maxlev = tree.maxStoredLevel();
278  bool levelFound = false;
279  for (int delta = 0; delta <= maxlev && !levelFound; ++delta)
280  for (int ifac = 1; ifac > -2 && !levelFound; ifac -= 2) {
281  const int level = usedLevel + ifac * delta;
282  if (level > 0 && level <= maxlev)
283  if (occupancy[level] == nClustersRequested) {
284  usedLevel = level;
285  levelFound = true;
286  }
287  }
288  assert(levelFound);
289  }
290  } else {
291  // Can't find that exact number of preclusters.
292  // Try to get the next best thing.
293  usedLevel = 1;
294  const unsigned occ1 = occupancy[1];
295  if (nClustersRequested >= occ1) {
296  const unsigned maxlev = tree.maxStoredLevel();
297  if (nClustersRequested > occupancy[maxlev])
298  usedLevel = maxlev;
299  else {
300  // It would be nice to use "lower_bound" here,
301  // but the occupancy is not necessarily monotonous.
302  unsigned bestDelta = nClustersRequested > occ1 ? nClustersRequested - occ1 : occ1 - nClustersRequested;
303  for (unsigned level = 2; level <= maxlev; ++level) {
304  const unsigned n = occupancy[level];
305  const unsigned d = nClustersRequested > n ? nClustersRequested - n : n - nClustersRequested;
306  if (d < bestDelta) {
307  bestDelta = d;
308  usedLevel = level;
309  }
310  }
311  }
312  }
313  }
314  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
315  } break;
316 
317  case LOCALLY_ADAPTIVE: {
318  usedLevel = tree.getLevel(fixedScale);
319  tree.getMagS2OptimalNodes(peakSelect, nClustersRequested, usedLevel, mynodes, &thresholds);
320  } break;
321 
322  default:
323  assert(!"ERROR in FFTJetProducer::selectTreeNodes : "
324  "should never get here! This is a bug. Please report.");
325  }
326 }
static const int stable
Definition: TopGenEvent.h:10
const double fixedScale
Resolution resolution
std::vector< unsigned > occupancy
const double minStableScale
const double maxStableScale
const unsigned nClustersRequested
unsigned usedLevel
std::vector< double > thresholds
d
Definition: ztail.py:151
const double stabilityAlpha
Definition: tree.py:1
void FFTJetProducer::setJetStatusBit ( RecoFFTJet jet,
int  mask,
bool  value 
)
staticprivate

Definition at line 909 of file FFTJetProducer.cc.

References mps_update::status.

Referenced by writeJets().

909  {
910  int status = jet->status();
911  if (value)
912  status |= mask;
913  else
914  status &= ~mask;
915  jet->setStatus(status);
916 }
Definition: value.py:1
template<typename T >
void FFTJetProducer::writeJets ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 516 of file FFTJetProducer.cc.

References fftjetcms::adjustForPileup(), calculatePileup, cellCountsVec, constituents, CONSTITUENTS_RESUMMED, fftjetcms::FFTJetInterface::energyFlow, mps_fire::i, metsig::jet, singleTopDQM_cfi::jets, eostools::move(), HLTTauReferences_cfi::OutputCollection, fftjetcms::FFTJetInterface::outputLabel, p4, pileup, PILEUP_CALCULATED, PILEUP_SUBTRACTED_4VEC, PILEUP_SUBTRACTED_PT, pileupEnergyFlow, DiDispStaMuonMonitor_cfi::pt, edm::Event::put(), recoJets, recombinationDataCutoff, resumConstituents, reco::FFTJet< Real >::setFourVec(), setJetStatusBit(), reco::FFTJet< Real >::setNCells(), reco::FFTJet< Real >::setPileup(), subtractPileup, subtractPileupAs4Vec, useGriddedAlgorithm, fftjetcms::FFTJetInterface::vertexUsed(), and reco::writeSpecific().

Referenced by saveResults().

516  {
517  using namespace reco;
518 
519  typedef FFTAnyJet<T> OutputJet;
520  typedef std::vector<OutputJet> OutputCollection;
521 
522  // Area of a single eta-phi cell for jet area calculations.
523  // Set it to 0 in case the module configuration does not allow
524  // us to calculate jet areas reliably.
525  double cellArea = useGriddedAlgorithm && recombinationDataCutoff < 0.0
526  ? energyFlow->etaBinWidth() * energyFlow->phiBinWidth()
527  : 0.0;
528 
529  if (calculatePileup)
530  cellArea = pileupEnergyFlow->etaBinWidth() * pileupEnergyFlow->phiBinWidth();
531 
532  // allocate output jet collection
533  auto jets = std::make_unique<OutputCollection>();
534  const unsigned nJets = recoJets.size();
535  jets->reserve(nJets);
536 
537  bool sorted = true;
538  double previousPt = DBL_MAX;
539  for (unsigned ijet = 0; ijet < nJets; ++ijet) {
540  RecoFFTJet& myjet(recoJets[ijet]);
541 
542  // Check if we should resum jet constituents
543  VectorLike jet4vec(myjet.vec());
544  if (resumConstituents) {
545  VectorLike sum(0.0, 0.0, 0.0, 0.0);
546  const unsigned nCon = constituents[ijet + 1].size();
547  const reco::CandidatePtr* cn = nCon ? &constituents[ijet + 1][0] : nullptr;
548  for (unsigned i = 0; i < nCon; ++i)
549  sum += cn[i]->p4();
550  jet4vec = sum;
551  setJetStatusBit(&myjet, CONSTITUENTS_RESUMMED, true);
552  }
553 
554  // Subtract the pile-up
556  jet4vec = adjustForPileup(jet4vec, pileup[ijet], subtractPileupAs4Vec);
559  else
560  setJetStatusBit(&myjet, PILEUP_SUBTRACTED_PT, true);
561  }
562 
563  // Write the specifics to the jet (simultaneously sets 4-vector,
564  // vertex, constituents). These are overridden functions that will
565  // call the appropriate specific code.
566  T jet;
567  writeSpecific(jet, jet4vec, vertexUsed(), constituents[ijet + 1], iSetup);
568 
569  // calcuate the jet area
570  double ncells = myjet.ncells();
571  if (calculatePileup) {
572  ncells = cellCountsVec[ijet];
573  setJetStatusBit(&myjet, PILEUP_CALCULATED, true);
574  }
575  jet.setJetArea(cellArea * ncells);
576 
577  // add jet to the list
578  FFTJet<float> fj(jetToStorable<float>(myjet));
579  fj.setFourVec(jet4vec);
580  if (calculatePileup) {
581  fj.setPileup(pileup[ijet]);
582  fj.setNCells(ncells);
583  }
584  jets->push_back(OutputJet(jet, fj));
585 
586  // Check whether the sequence remains sorted by pt
587  const double pt = jet.pt();
588  if (pt > previousPt)
589  sorted = false;
590  previousPt = pt;
591  }
592 
593  // Sort the collection
594  if (!sorted)
595  std::sort(jets->begin(), jets->end(), LocalSortByPt());
596 
597  // put the collection into the event
598  iEvent.put(std::move(jets), outputLabel);
599 }
std::vector< std::vector< reco::CandidatePtr > > constituents
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
const bool useGriddedAlgorithm
std::vector< fftjetcms::VectorLike > pileup
const bool resumConstituents
const reco::Particle::Point & vertexUsed() const
const bool subtractPileupAs4Vec
const bool subtractPileup
std::vector< RecoFFTJet > recoJets
const double recombinationDataCutoff
fftjet::RecombinedJet< VectorLike > RecoFFTJet
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
math::XYZTLorentzVector VectorLike
double p4[4]
Definition: TauolaWrapper.h:92
Implements inheritance relationships for FFTJet jets.
Definition: FFTAnyJet.h:16
static void setJetStatusBit(RecoFFTJet *jet, int mask, bool value)
std::vector< unsigned > cellCountsVec
const bool calculatePileup
fixed size matrix
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
long double T
const std::string outputLabel
math::XYZTLorentzVector adjustForPileup(const math::XYZTLorentzVector &jet, const math::XYZTLorentzVector &pileup, bool subtractPileupAs4Vec)
def move(src, dest)
Definition: eostools.py:511
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, edm::EventSetup const &c)
Definition: JetSpecific.cc:34

Member Data Documentation

const bool FFTJetProducer::assignConstituents
private

Definition at line 253 of file FFTJetProducer.h.

Referenced by beginJob(), buildGridAlg(), FFTJetProducer(), and produce().

std::unique_ptr<fftjetcms::AbsBgFunctor> FFTJetProducer::bgMembershipFunction
private

Definition at line 329 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const bool FFTJetProducer::calculatePileup
private

Definition at line 262 of file FFTJetProducer.h.

Referenced by beginJob(), produce(), and writeJets().

std::vector<unsigned> FFTJetProducer::cellCountsVec
private

Definition at line 394 of file FFTJetProducer.h.

Referenced by determinePileup(), and writeJets().

std::vector<std::vector<reco::CandidatePtr> > FFTJetProducer::constituents
private
const double FFTJetProducer::convergenceDistance
private

Definition at line 250 of file FFTJetProducer.h.

Referenced by checkConvergence().

std::vector<double> FFTJetProducer::doubleBuf
private

Definition at line 393 of file FFTJetProducer.h.

Referenced by determinePileup().

const double FFTJetProducer::fixedScale
private

Definition at line 271 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::InputTag FFTJetProducer::genJetsLabel
private

Definition at line 297 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

std::unique_ptr<GridAlg> FFTJetProducer::gridAlg
private
const double FFTJetProducer::gridScanMaxEta
private

Definition at line 288 of file FFTJetProducer.h.

Referenced by buildGridAlg().

std::unique_ptr<std::vector<double> > FFTJetProducer::iniScales
private

Definition at line 317 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadSparseTreeData().

edm::EDGetTokenT<reco::DiscretizedEnergyFlow> FFTJetProducer::input_energyflow_token_
private

Definition at line 399 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadEnergyFlow().

edm::EDGetTokenT<std::vector<reco::FFTAnyJet<reco::GenJet> > > FFTJetProducer::input_genjet_token_
private

Definition at line 398 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and genJetPreclusters().

edm::EDGetTokenT<reco::FFTJetPileupSummary> FFTJetProducer::input_pusummary_token_
private
edm::EDGetTokenT<reco::PattRecoTree<fftjetcms::Real, reco::PattRecoPeak<fftjetcms::Real> > > FFTJetProducer::input_recotree_token_
private

Definition at line 397 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadSparseTreeData().

const bool FFTJetProducer::isCrisp
private

Definition at line 292 of file FFTJetProducer.h.

Referenced by beginJob(), buildGridAlg(), and determinePileup().

unsigned FFTJetProducer::iterationsPerformed
private

Definition at line 374 of file FFTJetProducer.h.

Referenced by produce(), and saveResults().

std::vector<RecoFFTJet> FFTJetProducer::iterJets
private

Definition at line 373 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction().

std::vector<fftjet::Peak> FFTJetProducer::iterPreclusters
private

Definition at line 372 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and removeFakePreclusters().

std::unique_ptr<fftjet::Functor2<double, RecoFFTJet, RecoFFTJet> > FFTJetProducer::jetDistanceCalc
private

Definition at line 347 of file FFTJetProducer.h.

Referenced by beginJob(), and checkConvergence().

std::unique_ptr<fftjet::ScaleSpaceKernel> FFTJetProducer::jetMembershipFunction
private

Definition at line 328 of file FFTJetProducer.h.

Referenced by beginJob(), buildGridAlg(), and determinePileup().

bool FFTJetProducer::loadPileupFromDB
private

Definition at line 314 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

const unsigned FFTJetProducer::maxInitialPreclusters
private

Definition at line 302 of file FFTJetProducer.h.

Referenced by produce().

const unsigned FFTJetProducer::maxIterations
private

Definition at line 246 of file FFTJetProducer.h.

Referenced by beginJob(), iterateJetReconstruction(), produce(), and saveResults().

unsigned FFTJetProducer::maxLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::maxStableScale
private

Definition at line 275 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > FFTJetProducer::memberFactorCalcJet
private

Definition at line 343 of file FFTJetProducer.h.

Referenced by beginJob(), determinePileup(), and iterateJetReconstruction().

std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > FFTJetProducer::memberFactorCalcPeak
private

Definition at line 338 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

std::vector<fftjet::AbsKernel2d*> FFTJetProducer::memFcns2dVec
private

Definition at line 392 of file FFTJetProducer.h.

Referenced by determinePileup().

unsigned FFTJetProducer::minLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::minStableScale
private

Definition at line 274 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::ParameterSet FFTJetProducer::myConfiguration
private

Definition at line 232 of file FFTJetProducer.h.

Referenced by beginJob().

const unsigned FFTJetProducer::nClustersRequested
private

Definition at line 285 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const unsigned FFTJetProducer::nJetsRequiredToConverge
private

Definition at line 249 of file FFTJetProducer.h.

std::vector<SparseTree::NodeId> FFTJetProducer::nodes
private

Definition at line 350 of file FFTJetProducer.h.

Referenced by selectPreclusters().

const double FFTJetProducer::noiseLevel
private

Definition at line 282 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and produce().

std::vector<unsigned> FFTJetProducer::occupancy
private

Definition at line 359 of file FFTJetProducer.h.

Referenced by produce(), saveResults(), and selectTreeNodes().

std::unique_ptr<fftjet::Functor1<bool, fftjet::Peak> > FFTJetProducer::peakSelector
private

Definition at line 323 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

std::vector<fftjetcms::VectorLike> FFTJetProducer::pileup
private

Definition at line 381 of file FFTJetProducer.h.

Referenced by determinePileup(), produce(), and writeJets().

std::unique_ptr<fftjetcms::AbsPileupCalculator> FFTJetProducer::pileupDensityCalc
private

Definition at line 389 of file FFTJetProducer.h.

Referenced by beginJob(), and determinePileupDensityFromConfig().

std::unique_ptr<fftjet::Grid2d<fftjetcms::Real> > FFTJetProducer::pileupEnergyFlow
private

Definition at line 386 of file FFTJetProducer.h.

Referenced by beginJob(), determinePileup(), produce(), and writeJets().

const edm::InputTag FFTJetProducer::pileupLabel
private

Definition at line 268 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

std::string FFTJetProducer::pileupTableCategory
private

Definition at line 313 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableName
private

Definition at line 312 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableRecord
private

Definition at line 311 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::vector<fftjet::Peak> FFTJetProducer::preclusters
private
std::unique_ptr<RecoAlg> FFTJetProducer::recoAlg
private
std::vector<RecoFFTJet> FFTJetProducer::recoJets
private
const std::string FFTJetProducer::recombinationAlgorithm
private

Definition at line 291 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const double FFTJetProducer::recombinationDataCutoff
private

Definition at line 294 of file FFTJetProducer.h.

Referenced by buildGridAlg(), and writeJets().

std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > FFTJetProducer::recoScaleCalcJet
private

Definition at line 341 of file FFTJetProducer.h.

Referenced by beginJob(), determinePileup(), and iterateJetReconstruction().

std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > FFTJetProducer::recoScaleCalcPeak
private

Definition at line 332 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

std::unique_ptr<fftjet::Functor1<double, RecoFFTJet> > FFTJetProducer::recoScaleRatioCalcJet
private

Definition at line 342 of file FFTJetProducer.h.

Referenced by beginJob(), determinePileup(), and iterateJetReconstruction().

std::unique_ptr<fftjet::Functor1<double, fftjet::Peak> > FFTJetProducer::recoScaleRatioCalcPeak
private

Definition at line 335 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

Resolution FFTJetProducer::resolution
private

Definition at line 307 of file FFTJetProducer.h.

Referenced by genJetPreclusters(), produce(), selectPreclusters(), and selectTreeNodes().

const bool FFTJetProducer::resumConstituents
private

Definition at line 258 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), saveResults(), and writeJets().

const bool FFTJetProducer::reuseExistingGrid
private

Definition at line 243 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

SparseTree FFTJetProducer::sparseTree
private

Definition at line 320 of file FFTJetProducer.h.

Referenced by loadSparseTreeData(), produce(), saveResults(), and selectPreclusters().

const double FFTJetProducer::stabilityAlpha
private

Definition at line 278 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const bool FFTJetProducer::subtractPileup
private

Definition at line 263 of file FFTJetProducer.h.

Referenced by writeJets().

const bool FFTJetProducer::subtractPileupAs4Vec
private

Definition at line 264 of file FFTJetProducer.h.

Referenced by writeJets().

std::vector<double> FFTJetProducer::thresholds
private

Definition at line 362 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const edm::InputTag FFTJetProducer::treeLabel
private

Definition at line 235 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

fftjetcms::VectorLike FFTJetProducer::unclustered
private

Definition at line 368 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), produce(), and saveResults().

const double FFTJetProducer::unlikelyBgWeight
private

Definition at line 293 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

double FFTJetProducer::unused
private

Definition at line 369 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), produce(), and saveResults().

unsigned FFTJetProducer::usedLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const bool FFTJetProducer::useGriddedAlgorithm
private

Definition at line 239 of file FFTJetProducer.h.

Referenced by beginJob(), iterateJetReconstruction(), produce(), and writeJets().