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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
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
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (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

◆ GridAlg

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

Definition at line 172 of file FFTJetProducer.h.

◆ RecoAlg

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

Definition at line 171 of file FFTJetProducer.h.

◆ RecoFFTJet

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

Definition at line 79 of file FFTJetProducer.h.

◆ SparseTree

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

Definition at line 80 of file FFTJetProducer.h.

Member Enumeration Documentation

◆ Resolution

Enumerator
FIXED 
MAXIMALLY_STABLE 
GLOBALLY_ADAPTIVE 
LOCALLY_ADAPTIVE 
FROM_GENJETS 

Definition at line 93 of file FFTJetProducer.h.

◆ StatusBits

Enumerator
RESOLUTION 
CONSTITUENTS_RESUMMED 
PILEUP_CALCULATED 
PILEUP_SUBTRACTED_4VEC 
PILEUP_SUBTRACTED_PT 

Definition at line 85 of file FFTJetProducer.h.

85  {
86  RESOLUTION = 0xff,
87  CONSTITUENTS_RESUMMED = 0x100,
88  PILEUP_CALCULATED = 0x200,
89  PILEUP_SUBTRACTED_4VEC = 0x400,
90  PILEUP_SUBTRACTED_PT = 0x800
91  };

Constructor & Destructor Documentation

◆ FFTJetProducer() [1/3]

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

Definition at line 114 of file FFTJetProducer.cc.

115  : FFTJetInterface(ps),
116  myConfiguration(ps),
120  init_param(unsigned, maxIterations),
126  init_param(bool, subtractPileup),
129  init_param(double, fixedScale),
130  init_param(double, minStableScale),
131  init_param(double, maxStableScale),
132  init_param(double, stabilityAlpha),
133  init_param(double, noiseLevel),
134  init_param(unsigned, nClustersRequested),
135  init_param(double, gridScanMaxEta),
137  init_param(bool, isCrisp),
138  init_param(double, unlikelyBgWeight),
147 
148  minLevel(0),
149  maxLevel(0),
150  usedLevel(0),
151  unused(0.0),
153  constituents(200) {
154  // Check that the settings make sense
156  throw cms::Exception("FFTJetBadConfig") << "Can't resum constituents if they are not assigned" << std::endl;
157 
158  produces<reco::FFTJetProducerSummary>(outputLabel);
161 
162  // Build the set of pattern recognition scales.
163  // This is needed in order to read the clustering tree
164  // from the event record.
166  checkConfig(iniScales, "invalid set of scales");
167  std::sort(iniScales->begin(), iniScales->end(), std::greater<double>());
168 
170  consumes<reco::PattRecoTree<fftjetcms::Real, reco::PattRecoPeak<fftjetcms::Real> > >(treeLabel);
171  input_genjet_token_ = consumes<std::vector<reco::FFTAnyJet<reco::GenJet> > >(genJetsLabel);
172  input_energyflow_token_ = consumes<reco::DiscretizedEnergyFlow>(treeLabel);
173  input_pusummary_token_ = consumes<reco::FFTJetPileupSummary>(pileupLabel);
174 
175  // Most of the configuration has to be performed inside
176  // the "beginJob" method. This is because chaining of the
177  // parsers between this base class and the derived classes
178  // can not work from the constructor of the base class.
179 }

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.

◆ ~FFTJetProducer()

FFTJetProducer::~FFTJetProducer ( )
override

Definition at line 181 of file FFTJetProducer.cc.

181 {}

◆ FFTJetProducer() [2/3]

FFTJetProducer::FFTJetProducer ( )
privatedelete

◆ FFTJetProducer() [3/3]

FFTJetProducer::FFTJetProducer ( const FFTJetProducer )
privatedelete

Member Function Documentation

◆ assignMembershipFunctions()

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

Definition at line 797 of file FFTJetProducer.cc.

797 {}

Referenced by produce().

◆ beginJob()

void FFTJetProducer::beginJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 800 of file FFTJetProducer.cc.

800  {
802 
803  // Parse the peak selector definition
805  checkConfig(peakSelector, "invalid peak selector");
806 
808  checkConfig(jetMembershipFunction, "invalid jet membership function");
809 
811  checkConfig(bgMembershipFunction, "invalid noise membership function");
812 
813  // Build the energy recombination algorithm
814  if (!useGriddedAlgorithm) {
815  fftjet::DefaultVectorRecombinationAlgFactory<VectorLike, BgData, VBuilder> factory;
816  if (factory[recombinationAlgorithm] == nullptr)
817  throw cms::Exception("FFTJetBadConfig")
818  << "Invalid vector recombination algorithm \"" << recombinationAlgorithm << "\"" << std::endl;
819  recoAlg = std::unique_ptr<RecoAlg>(factory[recombinationAlgorithm]->create(jetMembershipFunction.get(),
820  &VectorLike::Et,
821  &VectorLike::Eta,
823  bgMembershipFunction.get(),
825  isCrisp,
826  false,
828  } else if (!reuseExistingGrid) {
829  energyFlow = fftjet_Grid2d_parser(ps.getParameter<edm::ParameterSet>("GridConfiguration"));
830  checkConfig(energyFlow, "invalid discretization grid");
831  buildGridAlg();
832  }
833 
834  // Create the grid subsequently used for pile-up subtraction
835  if (calculatePileup) {
836  pileupEnergyFlow = fftjet_Grid2d_parser(ps.getParameter<edm::ParameterSet>("PileupGridConfiguration"));
837  checkConfig(pileupEnergyFlow, "invalid pileup density grid");
838 
839  if (!loadPileupFromDB) {
841  checkConfig(pileupDensityCalc, "invalid pile-up density calculator");
842  }
843  }
844 
845  // Parse the calculator of the recombination scale
848  "invalid spec for the "
849  "reconstruction scale calculator from peaks");
850 
851  // Parse the calculator of the recombination scale ratio
854  "invalid spec for the "
855  "reconstruction scale ratio calculator from peaks");
856 
857  // Calculator for the membership function factor
860  "invalid spec for the "
861  "membership function factor calculator from peaks");
862 
863  if (maxIterations > 1) {
864  // We are going to run iteratively. Make required objects.
867  "invalid spec for the "
868  "reconstruction scale calculator from jets");
869 
872  "invalid spec for the "
873  "reconstruction scale ratio calculator from jets");
874 
877  "invalid spec for the "
878  "membership function factor calculator from jets");
879 
882  "invalid spec for the "
883  "jet distance calculator");
884  }
885 }

References assignConstituents, bgMembershipFunction, buildGridAlg(), calculatePileup, fftjetcms::FFTJetInterface::checkConfig(), beamerCreator::create(), 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.

◆ buildGridAlg()

void FFTJetProducer::buildGridAlg ( )
private

Definition at line 345 of file FFTJetProducer.cc.

345  {
346  int minBin = energyFlow->getEtaBin(-gridScanMaxEta);
347  if (minBin < 0)
348  minBin = 0;
349  int maxBin = energyFlow->getEtaBin(gridScanMaxEta) + 1;
350  if (maxBin < 0)
351  maxBin = 0;
352 
353  fftjet::DefaultRecombinationAlgFactory<Real, VectorLike, BgData, VBuilder> factory;
354  if (factory[recombinationAlgorithm] == nullptr)
355  throw cms::Exception("FFTJetBadConfig")
356  << "Invalid grid recombination algorithm \"" << recombinationAlgorithm << "\"" << std::endl;
357  gridAlg = std::unique_ptr<GridAlg>(factory[recombinationAlgorithm]->create(jetMembershipFunction.get(),
358  bgMembershipFunction.get(),
361  isCrisp,
362  false,
364  minBin,
365  maxBin));
366 }

References assignConstituents, bgMembershipFunction, beamerCreator::create(), fftjetcms::FFTJetInterface::energyFlow, Exception, gridAlg, gridScanMaxEta, isCrisp, jetMembershipFunction, cms::cuda::allocator::maxBin, cms::cuda::allocator::minBin, recombinationAlgorithm, recombinationDataCutoff, and unlikelyBgWeight.

Referenced by beginJob(), and produce().

◆ checkConvergence()

bool FFTJetProducer::checkConvergence ( const std::vector< RecoFFTJet > &  previousIterResult,
std::vector< RecoFFTJet > &  thisIterResult 
)
private

Definition at line 387 of file FFTJetProducer.cc.

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

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

Referenced by iterateJetReconstruction().

◆ determineGriddedConstituents()

void FFTJetProducer::determineGriddedConstituents ( )
private

Definition at line 476 of file FFTJetProducer.cc.

476  {
477  const unsigned nJets = recoJets.size();
478  const unsigned* clusterMask = gridAlg->getClusterMask();
479  const int nEta = gridAlg->getLastNEta();
480  const int nPhi = gridAlg->getLastNPhi();
481  const fftjet::Grid2d<Real>& g(*energyFlow);
482 
483  const unsigned nInputs = eventData.size();
484  const VectorLike* inp = nInputs ? &eventData[0] : nullptr;
485  const unsigned* candIdx = nInputs ? &candidateIndex[0] : nullptr;
486  for (unsigned i = 0; i < nInputs; ++i) {
487  const VectorLike& item(inp[i]);
488  const int iPhi = g.getPhiBin(item.Phi());
489  const int iEta = g.getEtaBin(item.Eta());
490  const unsigned mask = iEta >= 0 && iEta < nEta ? clusterMask[iEta * nPhi + iPhi] : 0;
491  assert(mask <= nJets);
492  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
493  }
494 }

References cms::cuda::assert(), fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, g, gridAlg, mps_fire::i, L1TowerCalibrationProducer_cfi::iEta, fftjetcms::FFTJetInterface::inputCollection, B2GTnPMonitor_cfi::item, HLT_FULL_cff::nEta, HLT_FULL_cff::nPhi, and recoJets.

Referenced by produce().

◆ determinePileup()

void FFTJetProducer::determinePileup ( )
private

Definition at line 988 of file FFTJetProducer.cc.

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

References cms::cuda::assert(), cellCountsVec, HLT_FULL_cff::dEta, doubleBuf, HLT_FULL_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_FULL_cff::nEta, HLT_FULL_cff::nPhi, pileup, pileupEnergyFlow, recoJets, recoScaleCalcJet, recoScaleRatioCalcJet, mitigatedMETSequence_cff::U, and SiPixelPI::zero.

Referenced by produce().

◆ determinePileupDensityFromConfig()

void FFTJetProducer::determinePileupDensityFromConfig ( const edm::Event iEvent,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 919 of file FFTJetProducer.cc.

920  {
923 
926  const bool phiDependent = calc.isPhiDependent();
927 
928  fftjet::Grid2d<Real>& g(*density);
929  const unsigned nEta = g.nEta();
930  const unsigned nPhi = g.nPhi();
931 
932  for (unsigned ieta = 0; ieta < nEta; ++ieta) {
933  const double eta(g.etaBinCenter(ieta));
934 
935  if (phiDependent) {
936  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
937  const double phi(g.phiBinCenter(iphi));
938  g.uncheckedSetBin(ieta, iphi, calc(eta, phi, s));
939  }
940  } else {
941  const double pil = calc(eta, 0.0, s);
942  for (unsigned iphi = 0; iphi < nPhi; ++iphi)
943  g.uncheckedSetBin(ieta, iphi, pil);
944  }
945  }
946 }

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

Referenced by produce().

◆ determinePileupDensityFromDB()

void FFTJetProducer::determinePileupDensityFromDB ( const edm::Event iEvent,
const edm::EventSetup iSetup,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 948 of file FFTJetProducer.cc.

950  {
953  std::shared_ptr<npstat::StorableMultivariateFunctor> f = (*h)[pileupTableCategory][pileupTableName];
954 
957 
958  const float rho = summary->pileupRho();
959  const bool phiDependent = f->minDim() == 3U;
960 
961  fftjet::Grid2d<Real>& g(*density);
962  const unsigned nEta = g.nEta();
963  const unsigned nPhi = g.nPhi();
964 
965  double functorArg[3] = {0.0, 0.0, 0.0};
966  if (phiDependent)
967  functorArg[2] = rho;
968  else
969  functorArg[1] = rho;
970 
971  for (unsigned ieta = 0; ieta < nEta; ++ieta) {
972  const double eta(g.etaBinCenter(ieta));
973  functorArg[0] = eta;
974 
975  if (phiDependent) {
976  for (unsigned iphi = 0; iphi < nPhi; ++iphi) {
977  functorArg[1] = g.phiBinCenter(iphi);
978  g.uncheckedSetBin(ieta, iphi, (*f)(functorArg, 3U));
979  }
980  } else {
981  const double pil = (*f)(functorArg, 2U);
982  for (unsigned iphi = 0; iphi < nPhi; ++iphi)
983  g.uncheckedSetBin(ieta, iphi, pil);
984  }
985  }
986 }

References fastSimProducer_cff::density, PVValHelper::eta, f, g, h, LEDCalibrationChannels::ieta, iEvent, input_pusummary_token_, StaticFFTJetRcdMapper< Mapper >::instance(), LEDCalibrationChannels::iphi, HLT_FULL_cff::nEta, HLT_FULL_cff::nPhi, pileupTableCategory, pileupTableName, pileupTableRecord, rho, edmLumisInFiles::summary, and mitigatedMETSequence_cff::U.

Referenced by produce().

◆ determineVectorConstituents()

void FFTJetProducer::determineVectorConstituents ( )
private

Definition at line 496 of file FFTJetProducer.cc.

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

References cms::cuda::assert(), fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::eventData, mps_fire::i, fftjetcms::FFTJetInterface::inputCollection, recoAlg, and recoJets.

Referenced by produce().

◆ endJob()

void FFTJetProducer::endJob ( void  )
overrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 1099 of file FFTJetProducer.cc.

1099 {}

◆ genJetPreclusters()

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 202 of file FFTJetProducer.cc.

206  {
207  typedef reco::FFTAnyJet<reco::GenJet> InputJet;
208  typedef std::vector<InputJet> InputCollection;
209 
211  iEvent.getByToken(input_genjet_token_, input);
212 
213  const unsigned sz = input->size();
214  preclusters->reserve(sz);
215  for (unsigned i = 0; i < sz; ++i) {
216  const RecoFFTJet& jet(jetFromStorable((*input)[i].getFFTSpecific()));
217  fftjet::Peak p(jet.precluster());
218  const double scale(p.scale());
219  p.setEtaPhi(jet.vec().Eta(), jet.vec().Phi());
220  p.setMagnitude(jet.vec().Pt() / scale / scale);
221  p.setStatus(resolution);
222  if (peakSelect(p))
223  preclusters->push_back(p);
224  }
225 }

References mps_fire::i, iEvent, input, input_genjet_token_, SimL1EmulatorRepack_GT2_cff::InputCollection, metsig::jet, fftjetcms::jetFromStorable(), AlCaHLTBitMon_ParallelJobs::p, preclusters, resolution, and HLT_FULL_cff::scale.

Referenced by produce().

◆ iterateJetReconstruction()

unsigned FFTJetProducer::iterateJetReconstruction ( )
private

Definition at line 409 of file FFTJetProducer.cc.

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

References cms::cuda::assert(), 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().

◆ loadEnergyFlow()

bool FFTJetProducer::loadEnergyFlow ( const edm::Event iEvent,
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &  flow 
)
private

Definition at line 368 of file FFTJetProducer.cc.

368  {
370  iEvent.getByToken(input_energyflow_token_, input);
371 
372  // Make sure that the grid is compatible with the stored one
373  bool rebuildGrid = flow.get() == nullptr;
374  if (!rebuildGrid)
375  rebuildGrid =
376  !(flow->nEta() == input->nEtaBins() && flow->nPhi() == input->nPhiBins() && flow->etaMin() == input->etaMin() &&
377  flow->etaMax() == input->etaMax() && flow->phiBin0Edge() == input->phiBin0Edge());
378  if (rebuildGrid) {
379  // We should not get here very often...
380  flow = std::make_unique<fftjet::Grid2d<Real> >(
381  input->nEtaBins(), input->etaMin(), input->etaMax(), input->nPhiBins(), input->phiBin0Edge(), input->title());
382  }
383  flow->blockSet(input->data(), input->nEtaBins(), input->nPhiBins());
384  return rebuildGrid;
385 }

References fftjetcommon_cfi::flow, iEvent, input, and input_energyflow_token_.

Referenced by produce().

◆ loadSparseTreeData()

template<class Real >
void FFTJetProducer::loadSparseTreeData ( const edm::Event iEvent)
private

Definition at line 187 of file FFTJetProducer.cc.

187  {
189 
190  // Get the input
192  iEvent.getByToken(input_recotree_token_, input);
193 
194  if (!input->isSparse())
195  throw cms::Exception("FFTJetBadConfig") << "The stored clustering tree is not sparse" << std::endl;
196 
198  sparseTree.sortNodes();
199  fftjet::updateSplitMergeTimes(sparseTree, sparseTree.minScale(), sparseTree.maxScale());
200 }

References fftjetcms::FFTJetInterface::getEventScale(), iEvent, iniScales, input, input_recotree_token_, fftjetcms::sparsePeakTreeFromStorable(), and sparseTree.

◆ makeProduces()

template<typename T >
void FFTJetProducer::makeProduces ( const std::string &  alias,
const std::string &  tag 
)
private

Definition at line 107 of file FFTJetProducer.cc.

107  {
108  produces<std::vector<reco::FFTAnyJet<T> > >(tag).setBranchAlias(alias);
109 }

References SiStripOfflineCRack_cfg::alias, and GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by FFTJetProducer().

◆ operator=()

FFTJetProducer& FFTJetProducer::operator= ( const FFTJetProducer )
privatedelete

◆ parse_bgMembershipFunction()

std::unique_ptr< AbsBgFunctor > FFTJetProducer::parse_bgMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 750 of file FFTJetProducer.cc.

750  {
751  return fftjet_BgFunctor_parser(ps.getParameter<edm::ParameterSet>("bgMembershipFunction"));
752 }

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

Referenced by beginJob().

◆ parse_jetDistanceCalc()

std::unique_ptr< fftjet::Functor2< double, FFTJetProducer::RecoFFTJet, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_jetDistanceCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 793 of file FFTJetProducer.cc.

793  {
794  return fftjet_JetDistance_parser(ps.getParameter<edm::ParameterSet>("jetDistanceCalc"));
795 }

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

Referenced by beginJob().

◆ parse_jetMembershipFunction()

std::unique_ptr< fftjet::ScaleSpaceKernel > FFTJetProducer::parse_jetMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 745 of file FFTJetProducer.cc.

745  {
746  return fftjet_MembershipFunction_parser(ps.getParameter<edm::ParameterSet>("jetMembershipFunction"));
747 }

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

Referenced by beginJob().

◆ parse_memberFactorCalcJet()

std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_memberFactorCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 787 of file FFTJetProducer.cc.

788  {
789  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("memberFactorCalcJet"));
790 }

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

Referenced by beginJob().

◆ parse_memberFactorCalcPeak()

std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_memberFactorCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 772 of file FFTJetProducer.cc.

773  {
774  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("memberFactorCalcPeak"));
775 }

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

Referenced by beginJob().

◆ parse_peakSelector()

std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > FFTJetProducer::parse_peakSelector ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 740 of file FFTJetProducer.cc.

740  {
741  return fftjet_PeakSelector_parser(ps.getParameter<edm::ParameterSet>("PeakSelectorConfiguration"));
742 }

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

Referenced by beginJob().

◆ parse_pileupDensityCalc()

std::unique_ptr< fftjetcms::AbsPileupCalculator > FFTJetProducer::parse_pileupDensityCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 761 of file FFTJetProducer.cc.

761  {
762  return fftjet_PileupCalculator_parser(ps.getParameter<edm::ParameterSet>("pileupDensityCalc"));
763 }

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

Referenced by beginJob().

◆ parse_recoScaleCalcJet()

std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 777 of file FFTJetProducer.cc.

778  {
779  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleCalcJet"));
780 }

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

Referenced by beginJob().

◆ parse_recoScaleCalcPeak()

std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 755 of file FFTJetProducer.cc.

756  {
757  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleCalcPeak"));
758 }

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

Referenced by beginJob().

◆ parse_recoScaleRatioCalcJet()

std::unique_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleRatioCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 782 of file FFTJetProducer.cc.

783  {
784  return fftjet_JetFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcJet"));
785 }

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

Referenced by beginJob().

◆ parse_recoScaleRatioCalcPeak()

std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleRatioCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 766 of file FFTJetProducer.cc.

767  {
768  return fftjet_PeakFunctor_parser(ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcPeak"));
769 }

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

Referenced by beginJob().

◆ parse_resolution()

FFTJetProducer::Resolution FFTJetProducer::parse_resolution ( const std::string &  name)
static

Definition at line 91 of file FFTJetProducer.cc.

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

References Exception, and Skims_PA_cff::name.

◆ prepareRecombinationScales()

void FFTJetProducer::prepareRecombinationScales ( )
private

Definition at line 329 of file FFTJetProducer.cc.

329  {
330  const unsigned nClus = preclusters.size();
331  if (nClus) {
332  fftjet::Peak* clus = &preclusters[0];
333  fftjet::Functor1<double, fftjet::Peak>& scaleCalc(*recoScaleCalcPeak);
334  fftjet::Functor1<double, fftjet::Peak>& ratioCalc(*recoScaleRatioCalcPeak);
335  fftjet::Functor1<double, fftjet::Peak>& factorCalc(*memberFactorCalcPeak);
336 
337  for (unsigned i = 0; i < nClus; ++i) {
338  clus[i].setRecoScale(scaleCalc(clus[i]));
339  clus[i].setRecoScaleRatio(ratioCalc(clus[i]));
340  clus[i].setMembershipFactor(factorCalc(clus[i]));
341  }
342  }
343 }

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

Referenced by produce().

◆ produce()

void FFTJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements edm::EDProducer.

Definition at line 638 of file FFTJetProducer.cc.

638  {
639  // Load the clustering tree made by FFTJetPatRecoProducer
641  loadSparseTreeData<float>(iEvent);
642  else
643  loadSparseTreeData<double>(iEvent);
644 
645  // Do we need to load the candidate collection?
648 
649  // Do we need to have discretized energy flow?
650  if (useGriddedAlgorithm) {
651  if (reuseExistingGrid) {
653  buildGridAlg();
654  } else
656  }
657 
658  // Calculate cluster occupancy as a function of level number
659  sparseTree.occupancyInScaleSpace(*peakSelector, &occupancy);
660 
661  // Select the preclusters using the requested resolution scheme
662  preclusters.clear();
663  if (resolution == FROM_GENJETS)
665  else
667  if (preclusters.size() > maxInitialPreclusters) {
668  std::sort(preclusters.begin(), preclusters.end(), std::greater<fftjet::Peak>());
670  }
671 
672  // Prepare to run the jet recombination procedure
674 
675  // Assign membership functions to preclusters. If this function
676  // is not overriden in a derived class, default algorithm membership
677  // function will be used for every cluster.
679 
680  // Count the preclusters going in
681  unsigned nPreclustersFound = 0U;
682  const unsigned npre = preclusters.size();
683  for (unsigned i = 0; i < npre; ++i)
684  if (preclusters[i].membershipFactor() > 0.0)
685  ++nPreclustersFound;
686 
687  // Run the recombination algorithm once
688  int status = 0;
691  else
693  if (status)
694  throw cms::Exception("FFTJetInterface") << "FFTJet algorithm failed (first iteration)" << std::endl;
695 
696  // If requested, iterate the jet recombination procedure
697  if (maxIterations > 1U && !recoJets.empty()) {
698  // It is possible to have a smaller number of jets than we had
699  // preclusters. Fake preclusters are possible, but for a good
700  // choice of pattern recognition kernel their presence should
701  // be infrequent. However, any fake preclusters will throw the
702  // iterative reconstruction off balance. Deal with the problem now.
703  const unsigned nJets = recoJets.size();
704  if (preclusters.size() != nJets) {
705  assert(nJets < preclusters.size());
707  }
709  } else
711 
712  // Determine jet constituents. FFTJet returns a map
713  // of constituents which is inverse to what we need here.
714  const unsigned nJets = recoJets.size();
715  if (constituents.size() <= nJets)
716  constituents.resize(nJets + 1U);
717  if (assignConstituents) {
718  for (unsigned i = 0; i <= nJets; ++i)
719  constituents[i].clear();
722  else
724  }
725 
726  // Figure out the pile-up
727  if (calculatePileup) {
728  if (loadPileupFromDB)
730  else
732  determinePileup();
733  assert(pileup.size() == recoJets.size());
734  }
735 
736  // Write out the results
737  saveResults(iEvent, iSetup, nPreclustersFound);
738 }

References cms::cuda::assert(), assignConstituents, assignMembershipFunctions(), buildGridAlg(), calculatePileup, 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.

◆ removeFakePreclusters()

void FFTJetProducer::removeFakePreclusters ( )
private

Definition at line 887 of file FFTJetProducer.cc.

887  {
888  // There are two possible reasons for fake preclusters:
889  // 1. Membership factor was set to 0
890  // 2. Genuine problem with pattern recognition
891  //
892  // Anyway, we need to match jets to preclusters and keep
893  // only those preclusters that have been matched
894  //
895  std::vector<int> matchTable;
896  const unsigned nmatched = matchOneToOne(recoJets, preclusters, JetToPeakDistance(), &matchTable);
897 
898  // Ensure that all jets have been matched.
899  // If not, we must have a bug somewhere.
900  assert(nmatched == recoJets.size());
901 
902  // Collect all matched preclusters
903  iterPreclusters.clear();
904  iterPreclusters.reserve(nmatched);
905  for (unsigned i = 0; i < nmatched; ++i)
906  iterPreclusters.push_back(preclusters[matchTable[i]]);
908 }

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

Referenced by iterateJetReconstruction(), and produce().

◆ saveResults()

void FFTJetProducer::saveResults ( edm::Event iEvent,
const edm::EventSetup iSetup,
unsigned  nPreclustersFound 
)
private

Definition at line 602 of file FFTJetProducer.cc.

602  {
603  // Write recombined jets
604  jet_type_switch(writeJets, ev, iSetup);
605 
606  // Check if we should resum unclustered energy constituents
607  VectorLike unclusE(unclustered);
608  if (resumConstituents) {
609  VectorLike sum(0.0, 0.0, 0.0, 0.0);
610  const unsigned nCon = constituents[0].size();
611  const reco::CandidatePtr* cn = nCon ? &constituents[0][0] : nullptr;
612  for (unsigned i = 0; i < nCon; ++i)
613  sum += cn[i]->p4();
614  unclusE = sum;
615  }
616 
617  // Write the jet reconstruction summary
618  const double minScale = minLevel ? sparseTree.getScale(minLevel) : 0.0;
619  const double maxScale = maxLevel ? sparseTree.getScale(maxLevel) : 0.0;
620  const double scaleUsed = usedLevel ? sparseTree.getScale(usedLevel) : 0.0;
621 
622  ev.put(
623  std::make_unique<reco::FFTJetProducerSummary>(thresholds,
624  occupancy,
625  unclusE,
626  constituents[0],
627  unused,
628  minScale,
629  maxScale,
630  scaleUsed,
631  nPreclustersFound,
634  outputLabel);
635 }

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

Referenced by produce().

◆ selectPreclusters()

void FFTJetProducer::selectPreclusters ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelector,
std::vector< fftjet::Peak > *  preclusters 
)
protectedvirtual

Definition at line 227 of file FFTJetProducer.cc.

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

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

Referenced by produce().

◆ selectTreeNodes()

void FFTJetProducer::selectTreeNodes ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelect,
std::vector< SparseTree::NodeId > *  nodes 
)
protected

Definition at line 249 of file FFTJetProducer.cc.

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

References cms::cuda::assert(), 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().

◆ setJetStatusBit()

void FFTJetProducer::setJetStatusBit ( RecoFFTJet jet,
int  mask,
bool  value 
)
staticprivate

Definition at line 910 of file FFTJetProducer.cc.

910  {
911  int status = jet->status();
912  if (value)
913  status |= mask;
914  else
915  status &= ~mask;
916  jet->setStatus(status);
917 }

References metsig::jet, and mps_update::status.

Referenced by writeJets().

◆ writeJets()

template<typename T >
void FFTJetProducer::writeJets ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 517 of file FFTJetProducer.cc.

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

References fftjetcms::adjustForPileup(), calculatePileup, cellCountsVec, constituents, CONSTITUENTS_RESUMMED, fftjetcms::FFTJetInterface::energyFlow, mps_fire::i, iEvent, 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, 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().

Member Data Documentation

◆ assignConstituents

const bool FFTJetProducer::assignConstituents
private

Definition at line 253 of file FFTJetProducer.h.

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

◆ bgMembershipFunction

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

Definition at line 329 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

◆ calculatePileup

const bool FFTJetProducer::calculatePileup
private

Definition at line 262 of file FFTJetProducer.h.

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

◆ cellCountsVec

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

Definition at line 394 of file FFTJetProducer.h.

Referenced by determinePileup(), and writeJets().

◆ constituents

std::vector<std::vector<reco::CandidatePtr> > FFTJetProducer::constituents
private

◆ convergenceDistance

const double FFTJetProducer::convergenceDistance
private

Definition at line 250 of file FFTJetProducer.h.

Referenced by checkConvergence().

◆ doubleBuf

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

Definition at line 393 of file FFTJetProducer.h.

Referenced by determinePileup().

◆ fixedScale

const double FFTJetProducer::fixedScale
private

Definition at line 271 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

◆ genJetsLabel

const edm::InputTag FFTJetProducer::genJetsLabel
private

Definition at line 297 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

◆ gridAlg

std::unique_ptr<GridAlg> FFTJetProducer::gridAlg
private

◆ gridScanMaxEta

const double FFTJetProducer::gridScanMaxEta
private

Definition at line 288 of file FFTJetProducer.h.

Referenced by buildGridAlg().

◆ iniScales

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

Definition at line 317 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadSparseTreeData().

◆ input_energyflow_token_

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

Definition at line 399 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadEnergyFlow().

◆ input_genjet_token_

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().

◆ input_pusummary_token_

edm::EDGetTokenT<reco::FFTJetPileupSummary> FFTJetProducer::input_pusummary_token_
private

◆ input_recotree_token_

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().

◆ isCrisp

const bool FFTJetProducer::isCrisp
private

Definition at line 292 of file FFTJetProducer.h.

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

◆ iterationsPerformed

unsigned FFTJetProducer::iterationsPerformed
private

Definition at line 374 of file FFTJetProducer.h.

Referenced by produce(), and saveResults().

◆ iterJets

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

Definition at line 373 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction().

◆ iterPreclusters

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

Definition at line 372 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and removeFakePreclusters().

◆ jetDistanceCalc

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

Definition at line 347 of file FFTJetProducer.h.

Referenced by beginJob(), and checkConvergence().

◆ jetMembershipFunction

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

Definition at line 328 of file FFTJetProducer.h.

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

◆ loadPileupFromDB

bool FFTJetProducer::loadPileupFromDB
private

Definition at line 314 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

◆ maxInitialPreclusters

const unsigned FFTJetProducer::maxInitialPreclusters
private

Definition at line 302 of file FFTJetProducer.h.

Referenced by produce().

◆ maxIterations

const unsigned FFTJetProducer::maxIterations
private

Definition at line 246 of file FFTJetProducer.h.

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

◆ maxLevel

unsigned FFTJetProducer::maxLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

◆ maxStableScale

const double FFTJetProducer::maxStableScale
private

Definition at line 275 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

◆ memberFactorCalcJet

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

Definition at line 343 of file FFTJetProducer.h.

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

◆ memberFactorCalcPeak

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

Definition at line 338 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

◆ memFcns2dVec

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

Definition at line 392 of file FFTJetProducer.h.

Referenced by determinePileup().

◆ minLevel

unsigned FFTJetProducer::minLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

◆ minStableScale

const double FFTJetProducer::minStableScale
private

Definition at line 274 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

◆ myConfiguration

const edm::ParameterSet FFTJetProducer::myConfiguration
private

Definition at line 232 of file FFTJetProducer.h.

Referenced by beginJob().

◆ nClustersRequested

const unsigned FFTJetProducer::nClustersRequested
private

Definition at line 285 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

◆ nJetsRequiredToConverge

const unsigned FFTJetProducer::nJetsRequiredToConverge
private

Definition at line 249 of file FFTJetProducer.h.

◆ nodes

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

Definition at line 350 of file FFTJetProducer.h.

Referenced by selectPreclusters().

◆ noiseLevel

const double FFTJetProducer::noiseLevel
private

Definition at line 282 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and produce().

◆ occupancy

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

Definition at line 359 of file FFTJetProducer.h.

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

◆ peakSelector

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

Definition at line 323 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

◆ pileup

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

Definition at line 381 of file FFTJetProducer.h.

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

◆ pileupDensityCalc

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

Definition at line 389 of file FFTJetProducer.h.

Referenced by beginJob(), and determinePileupDensityFromConfig().

◆ pileupEnergyFlow

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().

◆ pileupLabel

const edm::InputTag FFTJetProducer::pileupLabel
private

Definition at line 268 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

◆ pileupTableCategory

std::string FFTJetProducer::pileupTableCategory
private

Definition at line 313 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

◆ pileupTableName

std::string FFTJetProducer::pileupTableName
private

Definition at line 312 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

◆ pileupTableRecord

std::string FFTJetProducer::pileupTableRecord
private

Definition at line 311 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

◆ preclusters

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

◆ recoAlg

std::unique_ptr<RecoAlg> FFTJetProducer::recoAlg
private

◆ recoJets

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

◆ recombinationAlgorithm

const std::string FFTJetProducer::recombinationAlgorithm
private

Definition at line 291 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

◆ recombinationDataCutoff

const double FFTJetProducer::recombinationDataCutoff
private

Definition at line 294 of file FFTJetProducer.h.

Referenced by buildGridAlg(), and writeJets().

◆ recoScaleCalcJet

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

Definition at line 341 of file FFTJetProducer.h.

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

◆ recoScaleCalcPeak

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

Definition at line 332 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

◆ recoScaleRatioCalcJet

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

Definition at line 342 of file FFTJetProducer.h.

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

◆ recoScaleRatioCalcPeak

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

Resolution FFTJetProducer::resolution
private

Definition at line 307 of file FFTJetProducer.h.

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

◆ resumConstituents

const bool FFTJetProducer::resumConstituents
private

Definition at line 258 of file FFTJetProducer.h.

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

◆ reuseExistingGrid

const bool FFTJetProducer::reuseExistingGrid
private

Definition at line 243 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

◆ sparseTree

SparseTree FFTJetProducer::sparseTree
private

Definition at line 320 of file FFTJetProducer.h.

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

◆ stabilityAlpha

const double FFTJetProducer::stabilityAlpha
private

Definition at line 278 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

◆ subtractPileup

const bool FFTJetProducer::subtractPileup
private

Definition at line 263 of file FFTJetProducer.h.

Referenced by writeJets().

◆ subtractPileupAs4Vec

const bool FFTJetProducer::subtractPileupAs4Vec
private

Definition at line 264 of file FFTJetProducer.h.

Referenced by writeJets().

◆ thresholds

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

Definition at line 362 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

◆ treeLabel

const edm::InputTag FFTJetProducer::treeLabel
private

Definition at line 235 of file FFTJetProducer.h.

Referenced by FFTJetProducer().

◆ unclustered

fftjetcms::VectorLike FFTJetProducer::unclustered
private

Definition at line 368 of file FFTJetProducer.h.

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

◆ unlikelyBgWeight

const double FFTJetProducer::unlikelyBgWeight
private

Definition at line 293 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

◆ unused

double FFTJetProducer::unused
private

Definition at line 369 of file FFTJetProducer.h.

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

◆ usedLevel

unsigned FFTJetProducer::usedLevel
private

Definition at line 365 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

◆ useGriddedAlgorithm

const bool FFTJetProducer::useGriddedAlgorithm
private

Definition at line 239 of file FFTJetProducer.h.

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

personalPlayback.level
level
Definition: personalPlayback.py:22
FFTJetProducer::maxLevel
unsigned maxLevel
Definition: FFTJetProducer.h:365
fftjetcms::fftjet_PeakFunctor_parser
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:473
FFTJetProducer::selectPreclusters
virtual void selectPreclusters(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
Definition: FFTJetProducer.cc:227
cms::cuda::allocator::minBin
constexpr unsigned int minBin
Definition: getCachingDeviceAllocator.h:18
FFTJetProducer::isCrisp
const bool isCrisp
Definition: FFTJetProducer.h:292
fftjetcms::fftjet_MembershipFunction_parser
std::unique_ptr< fftjet::ScaleSpaceKernel > fftjet_MembershipFunction_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:227
FFTJetProducer::useGriddedAlgorithm
const bool useGriddedAlgorithm
Definition: FFTJetProducer.h:239
FFTJetProducer::doubleBuf
std::vector< double > doubleBuf
Definition: FFTJetProducer.h:393
FFTJetProducer::pileupEnergyFlow
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
Definition: FFTJetProducer.h:386
reco::writeSpecific
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
FFTJetProducer::loadPileupFromDB
bool loadPileupFromDB
Definition: FFTJetProducer.h:314
mps_fire.i
i
Definition: mps_fire.py:428
FFTJetProducer::FIXED
Definition: FFTJetProducer.h:93
input
static const std::string input
Definition: EdmProvDump.cc:48
fftjetcms::FFTJetInterface::FFTJetInterface
FFTJetInterface()=delete
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
FFTJetProducer::assignConstituents
const bool assignConstituents
Definition: FFTJetProducer.h:253
fftjetcms::PtEtaP4Builder
Definition: VBuilders.h:20
fftjetcms::FFTJetInterface::checkConfig
void checkConfig(const Ptr &ptr, const char *message)
Definition: FFTJetInterface.h:60
FFTJetProducer::parse_peakSelector
virtual std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > parse_peakSelector(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:740
FFTJetProducer::recoAlg
std::unique_ptr< RecoAlg > recoAlg
Definition: FFTJetProducer.h:326
fftjetcms::FFTJetInterface::loadInputCollection
void loadInputCollection(const edm::Event &)
Definition: FFTJetInterface.cc:40
FFTJetProducer::parse_recoScaleRatioCalcJet
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleRatioCalcJet(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:782
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
fftjetcms::FFTJetInterface::outputLabel
const std::string outputLabel
Definition: FFTJetInterface.h:76
HLT_FULL_cff.nEta
nEta
Definition: HLT_FULL_cff.py:6593
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
mps_update.status
status
Definition: mps_update.py:69
init_param
#define init_param(type, varname)
Definition: FFTJetProducer.cc:47
FFTJetProducer::recombinationDataCutoff
const double recombinationDataCutoff
Definition: FFTJetProducer.h:294
HLT_FULL_cff.scale
scale
Definition: HLT_FULL_cff.py:6634
FFTJetProducer::RESOLUTION
Definition: FFTJetProducer.h:86
fftjetcommon_cfi.maxScale
maxScale
Definition: fftjetcommon_cfi.py:110
fftjetcms::fftjet_ScaleSet_parser
std::unique_ptr< std::vector< double > > fftjet_ScaleSet_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:350
FFTJetProducer::myConfiguration
const edm::ParameterSet myConfiguration
Definition: FFTJetProducer.h:232
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
FFTJetProducer::recoJets
std::vector< RecoFFTJet > recoJets
Definition: FFTJetProducer.h:356
tree
Definition: tree.py:1
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
FFTJetProducer::parse_recoScaleRatioCalcPeak
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleRatioCalcPeak(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:766
fftjetcms::FFTJetInterface::inputCollection
edm::Handle< reco::CandidateView > inputCollection
Definition: FFTJetInterface.h:103
fftjetcms::matchOneToOne
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
FFTJetProducer::pileupTableCategory
std::string pileupTableCategory
Definition: FFTJetProducer.h:313
FFTJetProducer::recoScaleRatioCalcPeak
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
Definition: FFTJetProducer.h:335
reco::FFTJet< float >
FFTJetProducer::usedLevel
unsigned usedLevel
Definition: FFTJetProducer.h:365
cms::cuda::assert
assert(be >=bs)
fftjetcms::VectorLike
math::XYZTLorentzVector VectorLike
Definition: fftjetTypedefs.h:26
fftjetcms::fftjet_JetDistance_parser
std::unique_ptr< fftjet::Functor2< double, fftjet::RecombinedJet< VectorLike >, fftjet::RecombinedJet< VectorLike > > > fftjet_JetDistance_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:689
fftjetcms::FFTJetInterface::getEventScale
double getEventScale() const
Definition: FFTJetInterface.cc:38
FFTJetProducer::GLOBALLY_ADAPTIVE
Definition: FFTJetProducer.h:93
FFTJetProducer::parse_recoScaleCalcPeak
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleCalcPeak(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:755
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
FFTJetProducer::recoScaleRatioCalcJet
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
Definition: FFTJetProducer.h:342
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
FFTJetProducer::LOCALLY_ADAPTIVE
Definition: FFTJetProducer.h:93
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
jet_type_switch
#define jet_type_switch(method, arg1, arg2)
Definition: FFTJetProducer.cc:56
FFTJetProducer::convergenceDistance
const double convergenceDistance
Definition: FFTJetProducer.h:250
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13765
FFTJetProducer::PILEUP_SUBTRACTED_PT
Definition: FFTJetProducer.h:90
RecoFFTJet
fftjet::RecombinedJet< VectorLike > RecoFFTJet
Definition: FFTJetParameterParser.cc:37
FFTJetProducer::treeLabel
const edm::InputTag treeLabel
Definition: FFTJetProducer.h:235
edm::Handle
Definition: AssociativeIterator.h:50
fftjetcms::fftjet_BgFunctor_parser
std::unique_ptr< AbsBgFunctor > fftjet_BgFunctor_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:338
FFTJetProducer::selectTreeNodes
void selectTreeNodes(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelect, std::vector< SparseTree::NodeId > *nodes)
Definition: FFTJetProducer.cc:249
FFTJetProducer::recombinationAlgorithm
const std::string recombinationAlgorithm
Definition: FFTJetProducer.h:291
fftjetcms::FFTJetInterface::vertexUsed
const reco::Particle::Point & vertexUsed() const
Definition: FFTJetInterface.h:70
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
alignCSCRings.s
s
Definition: alignCSCRings.py:92
fftjetcms::FFTJetInterface::candidateIndex
std::vector< unsigned > candidateIndex
Definition: FFTJetInterface.h:97
FFTJetProducer::parse_bgMembershipFunction
virtual std::unique_ptr< fftjetcms::AbsBgFunctor > parse_bgMembershipFunction(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:750
h
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
FFTJetProducer::minLevel
unsigned minLevel
Definition: FFTJetProducer.h:365
PVValHelper::eta
Definition: PVValidationHelpers.h:69
FFTJetProducer::prepareRecombinationScales
void prepareRecombinationScales()
Definition: FFTJetProducer.cc:329
FFTJetProducer::peakSelector
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
Definition: FFTJetProducer.h:323
edm::ESHandle
Definition: DTSurvey.h:22
FFTJetProducer::PILEUP_CALCULATED
Definition: FFTJetProducer.h:88
FFTJetProducer::genJetPreclusters
virtual void genJetPreclusters(const SparseTree &tree, edm::Event &, const edm::EventSetup &, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
Definition: FFTJetProducer.cc:202
reco::FFTJetPileupSummary
Summary info for pile-up determined by Gaussian filtering.
Definition: FFTJetPileupSummary.h:13
FFTJetProducer::input_pusummary_token_
edm::EDGetTokenT< reco::FFTJetPileupSummary > input_pusummary_token_
Definition: FFTJetProducer.h:400
fftjetcms::sparsePeakTreeFromStorable
void sparsePeakTreeFromStorable(const reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > &in, const std::vector< double > *scaleSetIfNotAdaptive, double completeEventScale, fftjet::SparseClusteringTree< fftjet::Peak, long > *out)
Definition: clusteringTreeConverters.h:133
FFTJetProducer::recoScaleCalcPeak
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
Definition: FFTJetProducer.h:332
FFTJetProducer::iniScales
std::unique_ptr< std::vector< double > > iniScales
Definition: FFTJetProducer.h:317
FFTJetProducer::maxStableScale
const double maxStableScale
Definition: FFTJetProducer.h:275
VtxSmearedParameters_cfi.Phi
Phi
Definition: VtxSmearedParameters_cfi.py:112
FFTJetProducer::nJetsRequiredToConverge
const unsigned nJetsRequiredToConverge
Definition: FFTJetProducer.h:249
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
FFTJetProducer::jetMembershipFunction
std::unique_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
Definition: FFTJetProducer.h:328
DDAxes::rho
fftjetcms::Real
double Real
Definition: fftjetTypedefs.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
FFTJetProducer::unclustered
fftjetcms::VectorLike unclustered
Definition: FFTJetProducer.h:368
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
FFTJetProducer::buildGridAlg
void buildGridAlg()
Definition: FFTJetProducer.cc:345
FFTJetProducer::MAXIMALLY_STABLE
Definition: FFTJetProducer.h:93
reco::btau::jetPhi
Definition: TaggingVariable.h:36
FFTJetProducer::thresholds
std::vector< double > thresholds
Definition: FFTJetProducer.h:362
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
reco::PattRecoTree
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:20
edm::ParameterSet
Definition: ParameterSet.h:47
FFTJetProducer::pileup
std::vector< fftjetcms::VectorLike > pileup
Definition: FFTJetProducer.h:381
FFTJetProducer::parse_jetDistanceCalc
virtual std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > parse_jetDistanceCalc(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:793
FFTJetProducer::subtractPileupAs4Vec
const bool subtractPileupAs4Vec
Definition: FFTJetProducer.h:264
clear
void clear(HadCaloObj &c)
Definition: data.h:124
FFTJetProducer::FROM_GENJETS
Definition: FFTJetProducer.h:93
FFTJetProducer::memberFactorCalcPeak
std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
Definition: FFTJetProducer.h:338
FFTJetProducer::determinePileupDensityFromDB
virtual void determinePileupDensityFromDB(const edm::Event &iEvent, const edm::EventSetup &iSetup, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
Definition: FFTJetProducer.cc:948
FFTJetProducer::iterateJetReconstruction
unsigned iterateJetReconstruction()
Definition: FFTJetProducer.cc:409
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
cms::cuda::allocator::maxBin
constexpr unsigned int maxBin
Definition: getCachingDeviceAllocator.h:20
StaticFFTJetRcdMapper::instance
static const Mapper & instance()
Definition: FFTJetRcdMapper.h:86
HLT_FULL_cff.nPhi
nPhi
Definition: HLT_FULL_cff.py:6594
FFTJetProducer::iterationsPerformed
unsigned iterationsPerformed
Definition: FFTJetProducer.h:374
FFTJetProducer::parse_resolution
static Resolution parse_resolution(const std::string &name)
Definition: FFTJetProducer.cc:91
FFTJetProducer::resumConstituents
const bool resumConstituents
Definition: FFTJetProducer.h:258
fftjetcms::adjustForPileup
math::XYZTLorentzVector adjustForPileup(const math::XYZTLorentzVector &jet, const math::XYZTLorentzVector &pileup, bool subtractPileupAs4Vec)
Definition: adjustForPileup.cc:4
iEvent
int iEvent
Definition: GenABIO.cc:224
reco::FFTAnyJet
Implements inheritance relationships for FFTJet jets.
Definition: FFTAnyJet.h:16
FFTJetProducer::pileupLabel
const edm::InputTag pileupLabel
Definition: FFTJetProducer.h:268
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
fftjetcms::FFTJetInterface::energyFlow
std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
Definition: FFTJetInterface.h:100
fftjetcommon_cfi.minScale
minScale
Definition: fftjetcommon_cfi.py:109
FFTJetProducer::stabilityAlpha
const double stabilityAlpha
Definition: FFTJetProducer.h:278
p4
double p4[4]
Definition: TauolaWrapper.h:92
value
Definition: value.py:1
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
fftjetcms::FFTJetInterface::storeInSinglePrecision
bool storeInSinglePrecision() const
Definition: FFTJetInterface.cc:15
FFTJetProducer::writeJets
void writeJets(edm::Event &iEvent, const edm::EventSetup &)
Definition: FFTJetProducer.cc:517
FFTJetProducer::occupancy
std::vector< unsigned > occupancy
Definition: FFTJetProducer.h:359
FFTJetProducer::genJetsLabel
const edm::InputTag genJetsLabel
Definition: FFTJetProducer.h:297
FFTJetProducer::jetDistanceCalc
std::unique_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
Definition: FFTJetProducer.h:347
FFTJetProducer::gridScanMaxEta
const double gridScanMaxEta
Definition: FFTJetProducer.h:288
fftjetcms::fftjet_Grid2d_parser
std::unique_ptr< fftjet::Grid2d< Real > > fftjet_Grid2d_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:125
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
FFTJetProducer::CONSTITUENTS_RESUMMED
Definition: FFTJetProducer.h:87
FFTJetProducer::reuseExistingGrid
const bool reuseExistingGrid
Definition: FFTJetProducer.h:243
FFTJetProducer::makeProduces
void makeProduces(const std::string &alias, const std::string &tag)
Definition: FFTJetProducer.cc:107
fftjetcms::AbsPileupCalculator
Definition: AbsPileupCalculator.h:16
FFTJetProducer::input_genjet_token_
edm::EDGetTokenT< std::vector< reco::FFTAnyJet< reco::GenJet > > > input_genjet_token_
Definition: FFTJetProducer.h:398
FFTJetProducer::unused
double unused
Definition: FFTJetProducer.h:369
FFTJetProducer::determinePileupDensityFromConfig
virtual void determinePileupDensityFromConfig(const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
Definition: FFTJetProducer.cc:919
fftjetcms::JetToPeakDistance
Definition: JetToPeakDistance.h:9
FFTJetProducer::unlikelyBgWeight
const double unlikelyBgWeight
Definition: FFTJetProducer.h:293
FFTJetProducer::setJetStatusBit
static void setJetStatusBit(RecoFFTJet *jet, int mask, bool value)
Definition: FFTJetProducer.cc:910
edm::Ptr< Candidate >
FFTJetProducer::subtractPileup
const bool subtractPileup
Definition: FFTJetProducer.h:263
FFTJetProducer::PILEUP_SUBTRACTED_4VEC
Definition: FFTJetProducer.h:89
FFTJetProducer::recoScaleCalcJet
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
Definition: FFTJetProducer.h:341
FFTJetProducer::constituents
std::vector< std::vector< reco::CandidatePtr > > constituents
Definition: FFTJetProducer.h:377
DDAxes::phi
fftjetcommon_cfi.flow
flow
Definition: fftjetcommon_cfi.py:191
eostools.move
def move(src, dest)
Definition: eostools.py:511
FFTJetProducer::memberFactorCalcJet
std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
Definition: FFTJetProducer.h:343
fftjetcms::FFTJetInterface::eventData
std::vector< fftjetcms::VectorLike > eventData
Definition: FFTJetInterface.h:94
FFTJetProducer::removeFakePreclusters
void removeFakePreclusters()
Definition: FFTJetProducer.cc:887
FFTJetProducer::checkConvergence
bool checkConvergence(const std::vector< RecoFFTJet > &previousIterResult, std::vector< RecoFFTJet > &thisIterResult)
Definition: FFTJetProducer.cc:387
FFTJetProducer::input_energyflow_token_
edm::EDGetTokenT< reco::DiscretizedEnergyFlow > input_energyflow_token_
Definition: FFTJetProducer.h:399
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13764
T
long double T
Definition: Basic3DVectorLD.h:48
metsig::jet
Definition: SignAlgoResolutions.h:47
FFTJetProducer::iterJets
std::vector< RecoFFTJet > iterJets
Definition: FFTJetProducer.h:373
FFTJetProducer::parse_memberFactorCalcPeak
virtual std::unique_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_memberFactorCalcPeak(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:772
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
FFTJetProducer::bgMembershipFunction
std::unique_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
Definition: FFTJetProducer.h:329
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
FFTJetProducer::cellCountsVec
std::vector< unsigned > cellCountsVec
Definition: FFTJetProducer.h:394
Exception
Definition: hltDiff.cc:246
fftjetcms::jetFromStorable
fftjet::RecombinedJet< VectorLike > jetFromStorable(const reco::FFTJet< Real > &jet)
Definition: jetConverters.h:65
FFTJetProducer::parse_memberFactorCalcJet
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_memberFactorCalcJet(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:787
fftjetcms::fftjet_PileupCalculator_parser
std::unique_ptr< AbsPileupCalculator > fftjet_PileupCalculator_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:746
FFTJetProducer::gridAlg
std::unique_ptr< GridAlg > gridAlg
Definition: FFTJetProducer.h:327
FFTJetProducer::loadEnergyFlow
bool loadEnergyFlow(const edm::Event &iEvent, std::unique_ptr< fftjet::Grid2d< fftjetcms::Real > > &flow)
Definition: FFTJetProducer.cc:368
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SimL1EmulatorRepack_GT2_cff.InputCollection
InputCollection
Definition: SimL1EmulatorRepack_GT2_cff.py:16
FFTJetProducer::maxInitialPreclusters
const unsigned maxInitialPreclusters
Definition: FFTJetProducer.h:302
FFTJetProducer::sparseTree
SparseTree sparseTree
Definition: FFTJetProducer.h:320
TopDecayID::stable
static const int stable
Definition: TopGenEvent.h:10
FFTJetProducer::pileupTableName
std::string pileupTableName
Definition: FFTJetProducer.h:312
fftjetcms::FFTJetInterface::discretizeEnergyFlow
void discretizeEnergyFlow()
Definition: FFTJetInterface.cc:79
FFTJetProducer::nClustersRequested
const unsigned nClustersRequested
Definition: FFTJetProducer.h:285
FFTJetProducer::fixedScale
const double fixedScale
Definition: FFTJetProducer.h:271
FFTJetProducer::calculatePileup
const bool calculatePileup
Definition: FFTJetProducer.h:262
FFTJetProducer::resolution
Resolution resolution
Definition: FFTJetProducer.h:307
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
ztail.d
d
Definition: ztail.py:151
FFTJetProducer::parse_jetMembershipFunction
virtual std::unique_ptr< fftjet::ScaleSpaceKernel > parse_jetMembershipFunction(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:745
fftjetcms::fftjet_JetFunctor_parser
std::unique_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:589
cms::Exception
Definition: Exception.h:70
FFTJetProducer::input_recotree_token_
edm::EDGetTokenT< reco::PattRecoTree< fftjetcms::Real, reco::PattRecoPeak< fftjetcms::Real > > > input_recotree_token_
Definition: FFTJetProducer.h:397
FFTJetProducer::parse_pileupDensityCalc
virtual std::unique_ptr< fftjetcms::AbsPileupCalculator > parse_pileupDensityCalc(const edm::ParameterSet &ps)
Definition: FFTJetProducer.cc:761
FFTJetProducer::memFcns2dVec
std::vector< fftjet::AbsKernel2d * > memFcns2dVec
Definition: FFTJetProducer.h:392
FFTJetProducer::iterPreclusters
std::vector< fftjet::Peak > iterPreclusters
Definition: FFTJetProducer.h:372
FFTJetProducer::determineVectorConstituents
void determineVectorConstituents()
Definition: FFTJetProducer.cc:496
FFTJetProducer::minStableScale
const double minStableScale
Definition: FFTJetProducer.h:274
FFTJetProducer::pileupTableRecord
std::string pileupTableRecord
Definition: FFTJetProducer.h:311
HLTTauReferences_cfi.OutputCollection
OutputCollection
Definition: HLTTauReferences_cfi.py:92
FFTJetProducer::saveResults
void saveResults(edm::Event &iEvent, const edm::EventSetup &, unsigned nPreclustersFound)
Definition: FFTJetProducer.cc:602
FFTJetProducer::maxIterations
const unsigned maxIterations
Definition: FFTJetProducer.h:246
FFTJetProducer::preclusters
std::vector< fftjet::Peak > preclusters
Definition: FFTJetProducer.h:353
FFTJetProducer::determinePileup
void determinePileup()
Definition: FFTJetProducer.cc:988
edm::InputTag
Definition: InputTag.h:15
FFTJetProducer::noiseLevel
const double noiseLevel
Definition: FFTJetProducer.h:282
FFTJetProducer::pileupDensityCalc
std::unique_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
Definition: FFTJetProducer.h:389
FFTJetProducer::assignMembershipFunctions
virtual void assignMembershipFunctions(std::vector< fftjet::Peak > *preclusters)
Definition: FFTJetProducer.cc:797
FFTJetProducer::parse_recoScaleCalcJet
virtual std::unique_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleCalcJet(const edm::ParameterSet &)
Definition: FFTJetProducer.cc:777
FFTJetProducer::nodes
std::vector< SparseTree::NodeId > nodes
Definition: FFTJetProducer.h:350
fftjetcms::fftjet_PeakSelector_parser
std::unique_ptr< fftjet::Functor1< bool, fftjet::Peak > > fftjet_PeakSelector_parser(const edm::ParameterSet &ps)
Definition: FFTJetParameterParser.cc:166
g
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
FFTJetProducer::determineGriddedConstituents
void determineGriddedConstituents()
Definition: FFTJetProducer.cc:476
fastSimProducer_cff.density
density
Definition: fastSimProducer_cff.py:61
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31