CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
edm::EDProducer fftjetcms::FFTJetInterface edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef fftjet::RecombinedJet
< fftjetcms::VectorLike
RecoFFTJet
 
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
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

 FFTJetProducer (const edm::ParameterSet &)
 
virtual ~FFTJetProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 
- Public Member Functions inherited from fftjetcms::FFTJetInterface
virtual ~FFTJetInterface ()
 

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)
 

Protected Member Functions

virtual void assignMembershipFunctions (std::vector< fftjet::Peak > *preclusters)
 
virtual void beginJob ()
 
virtual void endJob ()
 
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::auto_ptr
< fftjetcms::AbsBgFunctor
parse_bgMembershipFunction (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor2< double,
RecoFFTJet, RecoFFTJet > > 
parse_jetDistanceCalc (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::ScaleSpaceKernel > 
parse_jetMembershipFunction (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
parse_memberFactorCalcJet (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
fftjet::Peak > > 
parse_memberFactorCalcPeak (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< bool,
fftjet::Peak > > 
parse_peakSelector (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjetcms::AbsPileupCalculator
parse_pileupDensityCalc (const edm::ParameterSet &ps)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
parse_recoScaleCalcJet (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
fftjet::Peak > > 
parse_recoScaleCalcPeak (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
parse_recoScaleRatioCalcJet (const edm::ParameterSet &)
 
virtual std::auto_ptr
< fftjet::Functor1< double,
fftjet::Peak > > 
parse_recoScaleRatioCalcPeak (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
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 edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- 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
 

Private Types

typedef
fftjet::AbsRecombinationAlg
< fftjetcms::Real,
fftjetcms::VectorLike,
fftjetcms::BgData
GridAlg
 
typedef
fftjet::AbsVectorRecombinationAlg
< fftjetcms::VectorLike,
fftjetcms::BgData
RecoAlg
 

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, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
 
virtual void determinePileupDensityFromDB (const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
 
void determineVectorConstituents ()
 
 FFTJetProducer ()
 
 FFTJetProducer (const FFTJetProducer &)
 
unsigned iterateJetReconstruction ()
 
template<class Real >
void loadSparseTreeData (const edm::Event &)
 
template<typename Jet >
void makeProduces (const std::string &alias, const std::string &tag)
 
FFTJetProduceroperator= (const FFTJetProducer &)
 
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 bool loadEnergyFlow (const edm::Event &iEvent, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &flow)
 
static void setJetStatusBit (RecoFFTJet *jet, int mask, bool value)
 

Private Attributes

const bool assignConstituents
 
std::auto_ptr
< fftjetcms::AbsBgFunctor
bgMembershipFunction
 
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::auto_ptr< GridAlggridAlg
 
const double gridScanMaxEta
 
std::auto_ptr< std::vector
< double > > 
iniScales
 
const bool isCrisp
 
unsigned iterationsPerformed
 
std::vector< RecoFFTJetiterJets
 
std::vector< fftjet::Peak > iterPreclusters
 
std::auto_ptr
< fftjet::Functor2< double,
RecoFFTJet, RecoFFTJet > > 
jetDistanceCalc
 
std::auto_ptr
< fftjet::ScaleSpaceKernel > 
jetMembershipFunction
 
bool loadPileupFromDB
 
const unsigned maxInitialPreclusters
 
const unsigned maxIterations
 
unsigned maxLevel
 
const double maxStableScale
 
std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
memberFactorCalcJet
 
std::auto_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::auto_ptr
< fftjet::Functor1< bool,
fftjet::Peak > > 
peakSelector
 
std::vector
< fftjetcms::VectorLike
pileup
 
std::auto_ptr
< fftjetcms::AbsPileupCalculator
pileupDensityCalc
 
std::auto_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::auto_ptr< RecoAlgrecoAlg
 
std::vector< RecoFFTJetrecoJets
 
const std::string recombinationAlgorithm
 
const double recombinationDataCutoff
 
std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
recoScaleCalcJet
 
std::auto_ptr
< fftjet::Functor1< double,
fftjet::Peak > > 
recoScaleCalcPeak
 
std::auto_ptr
< fftjet::Functor1< double,
RecoFFTJet > > 
recoScaleRatioCalcJet
 
std::auto_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::auto_ptr< fftjet::Grid2d
< fftjetcms::Real > > 
energyFlow
 
const std::vector< double > etaDependentMagnutideFactors
 
std::vector
< fftjetcms::VectorLike
eventData
 
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 57 of file FFTJetProducer.h.

Member Typedef Documentation

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

Definition at line 174 of file FFTJetProducer.h.

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

Definition at line 172 of file FFTJetProducer.h.

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

Definition at line 61 of file FFTJetProducer.h.

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

Definition at line 62 of file FFTJetProducer.h.

Member Enumeration Documentation

Enumerator
FIXED 
MAXIMALLY_STABLE 
GLOBALLY_ADAPTIVE 
LOCALLY_ADAPTIVE 
FROM_GENJETS 

Definition at line 76 of file FFTJetProducer.h.

Enumerator
RESOLUTION 
CONSTITUENTS_RESUMMED 
PILEUP_CALCULATED 
PILEUP_SUBTRACTED_4VEC 
PILEUP_SUBTRACTED_PT 

Definition at line 67 of file FFTJetProducer.h.

Constructor & Destructor Documentation

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

Definition at line 141 of file FFTJetProducer.cc.

References assignConstituents, fftjetcms::FFTJetInterface::checkConfig(), edm::hlt::Exception, fftjetcms::fftjet_ScaleSet_parser(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), iniScales, jet_type_switch, makeProduces(), fftjetcms::FFTJetInterface::outputLabel, resumConstituents, python.multivaluedict::sort(), and AlCaHLTBitMon_QueryRunRegistry::string.

142  : FFTJetInterface(ps),
143  myConfiguration(ps),
147  init_param(unsigned, maxIterations),
153  init_param(bool, subtractPileup),
156  init_param(double, fixedScale),
157  init_param(double, minStableScale),
158  init_param(double, maxStableScale),
159  init_param(double, stabilityAlpha),
160  init_param(double, noiseLevel),
161  init_param(unsigned, nClustersRequested),
162  init_param(double, gridScanMaxEta),
164  init_param(bool, isCrisp),
165  init_param(double, unlikelyBgWeight),
174 
175  minLevel(0),
176  maxLevel(0),
177  usedLevel(0),
178  unused(0.0),
180  constituents(200)
181 {
182  // Check that the settings make sense
184  throw cms::Exception("FFTJetBadConfig")
185  << "Can't resum constituents if they are not assigned"
186  << std::endl;
187 
188  produces<reco::FFTJetProducerSummary>(outputLabel);
190  "alias", outputLabel));
192 
193  // Build the set of pattern recognition scales.
194  // This is needed in order to read the clustering tree
195  // from the event record.
197  ps.getParameter<edm::ParameterSet>("InitialScales"));
198  checkConfig(iniScales, "invalid set of scales");
199  std::sort(iniScales->begin(), iniScales->end(), std::greater<double>());
200 
201  // Most of the configuration has to be performed inside
202  // the "beginJob" method. This is because chaining of the
203  // parsers between this base class and the derived classes
204  // can not work from the constructor of the base class.
205 }
std::vector< std::vector< reco::CandidatePtr > > constituents
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
unsigned iterationsPerformed
const bool useGriddedAlgorithm
static Resolution parse_resolution(const std::string &name)
const bool resumConstituents
const double gridScanMaxEta
const std::string recombinationAlgorithm
const double fixedScale
const bool subtractPileupAs4Vec
void checkConfig(const Ptr &ptr, const char *message)
const double unlikelyBgWeight
void makeProduces(const std::string &alias, const std::string &tag)
const bool subtractPileup
const unsigned nJetsRequiredToConverge
Resolution resolution
const bool isCrisp
const double recombinationDataCutoff
const double minStableScale
const double maxStableScale
#define init_param(type, varname)
const bool reuseExistingGrid
const unsigned nClustersRequested
std::auto_ptr< std::vector< double > > iniScales
unsigned usedLevel
const double noiseLevel
std::string pileupTableRecord
std::string pileupTableName
const bool calculatePileup
const bool assignConstituents
const edm::InputTag treeLabel
const edm::InputTag genJetsLabel
const edm::ParameterSet myConfiguration
const double stabilityAlpha
const unsigned maxInitialPreclusters
std::string pileupTableCategory
const double convergenceDistance
const edm::InputTag pileupLabel
#define jet_type_switch(method, arg1, arg2)
const std::string outputLabel
std::auto_ptr< std::vector< double > > fftjet_ScaleSet_parser(const edm::ParameterSet &ps)
const unsigned maxIterations
FFTJetProducer::~FFTJetProducer ( )
virtual

Definition at line 208 of file FFTJetProducer.cc.

209 {
210 }
FFTJetProducer::FFTJetProducer ( )
private
FFTJetProducer::FFTJetProducer ( const FFTJetProducer )
private

Member Function Documentation

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

Definition at line 975 of file FFTJetProducer.cc.

Referenced by produce().

976 {
977 }
void FFTJetProducer::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 981 of file FFTJetProducer.cc.

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

982 {
984 
985  // Parse the peak selector definition
987  checkConfig(peakSelector, "invalid peak selector");
988 
990  checkConfig(jetMembershipFunction, "invalid jet membership function");
991 
993  checkConfig(bgMembershipFunction, "invalid noise membership function");
994 
995  // Build the energy recombination algorithm
996  if (!useGriddedAlgorithm)
997  {
998  fftjet::DefaultVectorRecombinationAlgFactory<
999  VectorLike,BgData,VBuilder> factory;
1000  if (factory[recombinationAlgorithm] == NULL)
1001  throw cms::Exception("FFTJetBadConfig")
1002  << "Invalid vector recombination algorithm \""
1003  << recombinationAlgorithm << "\"" << std::endl;
1004  recoAlg = std::auto_ptr<RecoAlg>(
1005  factory[recombinationAlgorithm]->create(
1006  jetMembershipFunction.get(),
1007  &VectorLike::Et, &VectorLike::Eta, &VectorLike::Phi,
1008  bgMembershipFunction.get(),
1010  }
1011  else if (!reuseExistingGrid)
1012  {
1014  ps.getParameter<edm::ParameterSet>("GridConfiguration"));
1015  checkConfig(energyFlow, "invalid discretization grid");
1016  buildGridAlg();
1017  }
1018 
1019  // Create the grid subsequently used for pile-up subtraction
1020  if (calculatePileup)
1021  {
1023  ps.getParameter<edm::ParameterSet>("PileupGridConfiguration"));
1024  checkConfig(pileupEnergyFlow, "invalid pileup density grid");
1025 
1026  if (!loadPileupFromDB)
1027  {
1029  checkConfig(pileupDensityCalc, "invalid pile-up density calculator");
1030  }
1031  }
1032 
1033  // Parse the calculator of the recombination scale
1035  checkConfig(recoScaleCalcPeak, "invalid spec for the "
1036  "reconstruction scale calculator from peaks");
1037 
1038  // Parse the calculator of the recombination scale ratio
1040  checkConfig(recoScaleRatioCalcPeak, "invalid spec for the "
1041  "reconstruction scale ratio calculator from peaks");
1042 
1043  // Calculator for the membership function factor
1045  checkConfig(memberFactorCalcPeak, "invalid spec for the "
1046  "membership function factor calculator from peaks");
1047 
1048  if (maxIterations > 1)
1049  {
1050  // We are going to run iteratively. Make required objects.
1052  checkConfig(recoScaleCalcJet, "invalid spec for the "
1053  "reconstruction scale calculator from jets");
1054 
1056  checkConfig(recoScaleRatioCalcJet, "invalid spec for the "
1057  "reconstruction scale ratio calculator from jets");
1058 
1060  checkConfig(memberFactorCalcJet, "invalid spec for the "
1061  "membership function factor calculator from jets");
1062 
1064  checkConfig(memberFactorCalcJet, "invalid spec for the "
1065  "jet distance calculator");
1066  }
1067 }
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::auto_ptr< RecoAlg > recoAlg
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
const bool useGriddedAlgorithm
std::auto_ptr< fftjet::Grid2d< Real > > fftjet_Grid2d_parser(const edm::ParameterSet &ps)
virtual std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleRatioCalcPeak(const edm::ParameterSet &)
std::auto_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
virtual std::auto_ptr< fftjet::Functor1< bool, fftjet::Peak > > parse_peakSelector(const edm::ParameterSet &)
virtual std::auto_ptr< fftjetcms::AbsPileupCalculator > parse_pileupDensityCalc(const edm::ParameterSet &ps)
double BgData
const std::string recombinationAlgorithm
virtual std::auto_ptr< fftjetcms::AbsBgFunctor > parse_bgMembershipFunction(const edm::ParameterSet &)
#define NULL
Definition: scimark2.h:8
void checkConfig(const Ptr &ptr, const char *message)
const double unlikelyBgWeight
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
const bool isCrisp
virtual std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_memberFactorCalcPeak(const edm::ParameterSet &)
std::auto_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
const bool reuseExistingGrid
math::XYZTLorentzVector VectorLike
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
virtual std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleCalcJet(const edm::ParameterSet &)
virtual std::auto_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > parse_jetDistanceCalc(const edm::ParameterSet &)
const bool calculatePileup
const bool assignConstituents
const edm::ParameterSet myConfiguration
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
virtual std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_memberFactorCalcJet(const edm::ParameterSet &)
virtual std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > parse_recoScaleCalcPeak(const edm::ParameterSet &)
virtual std::auto_ptr< fftjet::ScaleSpaceKernel > parse_jetMembershipFunction(const edm::ParameterSet &)
virtual std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > parse_recoScaleRatioCalcJet(const edm::ParameterSet &)
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
std::auto_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
std::auto_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
std::auto_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
const unsigned maxIterations
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
void FFTJetProducer::buildGridAlg ( )
private

Definition at line 422 of file FFTJetProducer.cc.

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

Referenced by beginJob(), and produce().

423 {
424  int minBin = energyFlow->getEtaBin(-gridScanMaxEta);
425  if (minBin < 0)
426  minBin = 0;
427  int maxBin = energyFlow->getEtaBin(gridScanMaxEta) + 1;
428  if (maxBin < 0)
429  maxBin = 0;
430 
431  fftjet::DefaultRecombinationAlgFactory<
432  Real,VectorLike,BgData,VBuilder> factory;
433  if (factory[recombinationAlgorithm] == NULL)
434  throw cms::Exception("FFTJetBadConfig")
435  << "Invalid grid recombination algorithm \""
436  << recombinationAlgorithm << "\"" << std::endl;
437  gridAlg = std::auto_ptr<GridAlg>(
438  factory[recombinationAlgorithm]->create(
439  jetMembershipFunction.get(),
440  bgMembershipFunction.get(),
442  isCrisp, false, assignConstituents, minBin, maxBin));
443 }
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
const double gridScanMaxEta
std::auto_ptr< GridAlg > gridAlg
double BgData
const std::string recombinationAlgorithm
#define NULL
Definition: scimark2.h:8
const double unlikelyBgWeight
const bool isCrisp
const double recombinationDataCutoff
std::auto_ptr< fftjetcms::AbsBgFunctor > bgMembershipFunction
math::XYZTLorentzVector VectorLike
const bool assignConstituents
double Real
std::auto_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
bool FFTJetProducer::checkConvergence ( const std::vector< RecoFFTJet > &  previousIterResult,
std::vector< RecoFFTJet > &  thisIterResult 
)
private

Definition at line 475 of file FFTJetProducer.cc.

References convergenceDistance, i, jetDistanceCalc, and GetRecoTauVFromDQM_MC_cff::next.

Referenced by iterateJetReconstruction().

477 {
478  fftjet::Functor2<double,RecoFFTJet,RecoFFTJet>&
479  distanceCalc(*jetDistanceCalc);
480 
481  const unsigned nJets = previous.size();
482  if (nJets != nextSet.size())
483  return false;
484 
485  const RecoFFTJet* prev = &previous[0];
486  RecoFFTJet* next = &nextSet[0];
487 
488  // Calculate convergence distances for all jets
489  bool converged = true;
490  for (unsigned i=0; i<nJets; ++i)
491  {
492  const double d = distanceCalc(prev[i], next[i]);
493  next[i].setConvergenceDistance(d);
494  if (i < nJetsRequiredToConverge && d > convergenceDistance)
495  converged = false;
496  }
497 
498  return converged;
499 }
int i
Definition: DBlmapReader.cc:9
fftjet::RecombinedJet< VectorLike > RecoFFTJet
const double convergenceDistance
std::auto_ptr< fftjet::Functor2< double, RecoFFTJet, RecoFFTJet > > jetDistanceCalc
void FFTJetProducer::determineGriddedConstituents ( )
private

Definition at line 579 of file FFTJetProducer.cc.

References fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, g, gridAlg, i, fftjetcms::FFTJetInterface::inputCollection, and recoJets.

Referenced by produce().

580 {
581  const unsigned nJets = recoJets.size();
582  const unsigned* clusterMask = gridAlg->getClusterMask();
583  const int nEta = gridAlg->getLastNEta();
584  const int nPhi = gridAlg->getLastNPhi();
585  const fftjet::Grid2d<Real>& g(*energyFlow);
586 
587  const unsigned nInputs = eventData.size();
588  const VectorLike* inp = nInputs ? &eventData[0] : 0;
589  const unsigned* candIdx = nInputs ? &candidateIndex[0] : 0;
590  for (unsigned i=0; i<nInputs; ++i)
591  {
592  const VectorLike& item(inp[i]);
593  const int iPhi = g.getPhiBin(item.Phi());
594  const int iEta = g.getEtaBin(item.Eta());
595  const unsigned mask = iEta >= 0 && iEta < nEta ?
596  clusterMask[iEta*nPhi + iPhi] : 0;
597  assert(mask <= nJets);
598  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
599  }
600 }
std::vector< std::vector< reco::CandidatePtr > > constituents
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
edm::Handle< reco::CandidateView > inputCollection
std::auto_ptr< GridAlg > gridAlg
std::vector< RecoFFTJet > recoJets
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
std::vector< unsigned > candidateIndex
math::XYZTLorentzVector VectorLike
std::vector< fftjetcms::VectorLike > eventData
void FFTJetProducer::determinePileup ( )
private

Definition at line 1195 of file FFTJetProducer.cc.

References cellCountsVec, doubleBuf, dPhi(), eta(), f, g, i, isCrisp, metsig::jet, jetMembershipFunction, reco::btau::jetPhi, M_PI, memberFactorCalcJet, memFcns2dVec, pileup, pileupEnergyFlow, recoJets, recoScaleCalcJet, and recoScaleRatioCalcJet.

Referenced by produce().

1196 {
1197  // This function works with crisp clustering only
1198  if (!isCrisp)
1199  assert(!"Pile-up subtraction for fuzzy clustering "
1200  "is not implemented yet");
1201 
1202  // Clear the pileup vector
1203  const unsigned nJets = recoJets.size();
1204  pileup.resize(nJets);
1205  if (nJets == 0)
1206  return;
1207  const VectorLike zero;
1208  for (unsigned i=0; i<nJets; ++i)
1209  pileup[i] = zero;
1210 
1211  // Pileup energy flow grid
1212  const fftjet::Grid2d<Real>& g(*pileupEnergyFlow);
1213  const unsigned nEta = g.nEta();
1214  const unsigned nPhi = g.nPhi();
1215  const double cellArea = g.etaBinWidth() * g.phiBinWidth();
1216 
1217  // Various calculators
1218  fftjet::Functor1<double,RecoFFTJet>& scaleCalc(*recoScaleCalcJet);
1219  fftjet::Functor1<double,RecoFFTJet>& ratioCalc(*recoScaleRatioCalcJet);
1220  fftjet::Functor1<double,RecoFFTJet>& factorCalc(*memberFactorCalcJet);
1221 
1222  // Make sure we have enough memory
1223  memFcns2dVec.resize(nJets);
1224  fftjet::AbsKernel2d** memFcns2d = &memFcns2dVec[0];
1225 
1226  doubleBuf.resize(nJets*4U + nJets*nPhi);
1227  double* recoScales = &doubleBuf[0];
1228  double* recoScaleRatios = recoScales + nJets;
1229  double* memFactors = recoScaleRatios + nJets;
1230  double* dEta = memFactors + nJets;
1231  double* dPhiBuf = dEta + nJets;
1232 
1233  cellCountsVec.resize(nJets);
1234  unsigned* cellCounts = &cellCountsVec[0];
1235 
1236  // Go over jets and collect the necessary info
1237  for (unsigned ijet=0; ijet<nJets; ++ijet)
1238  {
1239  const RecoFFTJet& jet(recoJets[ijet]);
1240  const fftjet::Peak& peak(jet.precluster());
1241 
1242  // Make sure we are using 2-d membership functions.
1243  // Pile-up subtraction scheme for 3-d functions should be different.
1244  fftjet::AbsMembershipFunction* m3d =
1245  dynamic_cast<fftjet::AbsMembershipFunction*>(
1246  peak.membershipFunction());
1247  if (m3d == 0)
1248  m3d = dynamic_cast<fftjet::AbsMembershipFunction*>(
1249  jetMembershipFunction.get());
1250  if (m3d)
1251  {
1252  assert(!"Pile-up subtraction for 3-d membership functions "
1253  "is not implemented yet");
1254  }
1255  else
1256  {
1257  fftjet::AbsKernel2d* m2d =
1258  dynamic_cast<fftjet::AbsKernel2d*>(
1259  peak.membershipFunction());
1260  if (m2d == 0)
1261  m2d = dynamic_cast<fftjet::AbsKernel2d*>(
1262  jetMembershipFunction.get());
1263  assert(m2d);
1264  memFcns2d[ijet] = m2d;
1265  }
1266  recoScales[ijet] = scaleCalc(jet);
1267  recoScaleRatios[ijet] = ratioCalc(jet);
1268  memFactors[ijet] = factorCalc(jet);
1269  cellCounts[ijet] = 0U;
1270 
1271  const double jetPhi = jet.vec().Phi();
1272  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1273  {
1274  double dphi = g.phiBinCenter(iphi) - jetPhi;
1275  while (dphi > M_PI)
1276  dphi -= (2.0*M_PI);
1277  while (dphi < -M_PI)
1278  dphi += (2.0*M_PI);
1279  dPhiBuf[iphi*nJets+ijet] = dphi;
1280  }
1281  }
1282 
1283  // Go over all grid points and integrate
1284  // the pile-up energy density
1285  VBuilder vMaker;
1286  for (unsigned ieta=0; ieta<nEta; ++ieta)
1287  {
1288  const double eta(g.etaBinCenter(ieta));
1289  const Real* databuf = g.data() + ieta*nPhi;
1290 
1291  // Figure out dEta for each jet
1292  for (unsigned ijet=0; ijet<nJets; ++ijet)
1293  dEta[ijet] = eta - recoJets[ijet].vec().Eta();
1294 
1295  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1296  {
1297  double maxW(0.0);
1298  unsigned maxWJet(nJets);
1299  const double* dPhi = dPhiBuf + iphi*nJets;
1300 
1301  for (unsigned ijet=0; ijet<nJets; ++ijet)
1302  {
1303  if (recoScaleRatios[ijet] > 0.0)
1304  memFcns2d[ijet]->setScaleRatio(recoScaleRatios[ijet]);
1305  const double f = memFactors[ijet]*
1306  (*memFcns2d[ijet])(dEta[ijet], dPhi[ijet],
1307  recoScales[ijet]);
1308  if (f > maxW)
1309  {
1310  maxW = f;
1311  maxWJet = ijet;
1312  }
1313  }
1314 
1315  if (maxWJet < nJets)
1316  {
1317  pileup[maxWJet] += vMaker(cellArea*databuf[iphi],
1318  eta, g.phiBinCenter(iphi));
1319  cellCounts[maxWJet]++;
1320  }
1321  }
1322  }
1323 }
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
int i
Definition: DBlmapReader.cc:9
std::vector< fftjetcms::VectorLike > pileup
std::vector< double > doubleBuf
std::vector< fftjet::AbsKernel2d * > memFcns2dVec
std::vector< RecoFFTJet > recoJets
const bool isCrisp
T eta() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
fftjet::RecombinedJet< VectorLike > RecoFFTJet
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
math::XYZTLorentzVector VectorLike
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
double f[11][100]
std::vector< unsigned > cellCountsVec
double Real
#define M_PI
Definition: BFit3D.cc:3
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
std::auto_ptr< fftjet::ScaleSpaceKernel > jetMembershipFunction
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
void FFTJetProducer::determinePileupDensityFromConfig ( const edm::Event iEvent,
const edm::InputTag label,
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 1108 of file FFTJetProducer.cc.

References eta(), g, edm::Event::getByLabel(), fftjetcms::AbsPileupCalculator::isPhiDependent(), phi, pileupDensityCalc, alignCSCRings::s, and edmLumisInFiles::summary.

Referenced by produce().

1111 {
1113  iEvent.getByLabel(label, summary);
1114 
1115  const reco::FFTJetPileupSummary& s(*summary);
1116  const AbsPileupCalculator& calc(*pileupDensityCalc);
1117  const bool phiDependent = calc.isPhiDependent();
1118 
1119  fftjet::Grid2d<Real>& g(*density);
1120  const unsigned nEta = g.nEta();
1121  const unsigned nPhi = g.nPhi();
1122 
1123  for (unsigned ieta=0; ieta<nEta; ++ieta)
1124  {
1125  const double eta(g.etaBinCenter(ieta));
1126 
1127  if (phiDependent)
1128  {
1129  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1130  {
1131  const double phi(g.phiBinCenter(iphi));
1132  g.uncheckedSetBin(ieta, iphi, calc(eta, phi, s));
1133  }
1134  }
1135  else
1136  {
1137  const double pil = calc(eta, 0.0, s);
1138  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1139  g.uncheckedSetBin(ieta, iphi, pil);
1140  }
1141  }
1142 }
std::auto_ptr< fftjetcms::AbsPileupCalculator > pileupDensityCalc
T eta() const
Summary info for pile-up determined by Gaussian filtering.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
Definition: DDAxes.h:10
void FFTJetProducer::determinePileupDensityFromDB ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const edm::InputTag label,
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &  density 
)
privatevirtual

Definition at line 1145 of file FFTJetProducer.cc.

References eta(), f, g, edm::Event::getByLabel(), h, StaticFFTJetRcdMapper< Mapper >::instance(), pileupTableCategory, pileupTableName, pileupTableRecord, rho, and edmLumisInFiles::summary.

Referenced by produce().

1149 {
1152  iSetup, pileupTableRecord, h);
1153  boost::shared_ptr<npstat::StorableMultivariateFunctor> f =
1155 
1157  iEvent.getByLabel(label, summary);
1158 
1159  const float rho = summary->pileupRho();
1160  const bool phiDependent = f->minDim() == 3U;
1161 
1162  fftjet::Grid2d<Real>& g(*density);
1163  const unsigned nEta = g.nEta();
1164  const unsigned nPhi = g.nPhi();
1165 
1166  double functorArg[3] = {0.0, 0.0, 0.0};
1167  if (phiDependent)
1168  functorArg[2] = rho;
1169  else
1170  functorArg[1] = rho;
1171 
1172  for (unsigned ieta=0; ieta<nEta; ++ieta)
1173  {
1174  const double eta(g.etaBinCenter(ieta));
1175  functorArg[0] = eta;
1176 
1177  if (phiDependent)
1178  {
1179  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1180  {
1181  functorArg[1] = g.phiBinCenter(iphi);
1182  g.uncheckedSetBin(ieta, iphi, (*f)(functorArg, 3U));
1183  }
1184  }
1185  else
1186  {
1187  const double pil = (*f)(functorArg, 2U);
1188  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1189  g.uncheckedSetBin(ieta, iphi, pil);
1190  }
1191  }
1192 }
Definition: DDAxes.h:10
T eta() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
double f[11][100]
std::string pileupTableRecord
std::string pileupTableName
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
std::string pileupTableCategory
static const Mapper & instance()
void FFTJetProducer::determineVectorConstituents ( )
private

Definition at line 603 of file FFTJetProducer.cc.

References fftjetcms::FFTJetInterface::candidateIndex, constituents, fftjetcms::FFTJetInterface::eventData, i, fftjetcms::FFTJetInterface::inputCollection, recoAlg, and recoJets.

Referenced by produce().

604 {
605  const unsigned nJets = recoJets.size();
606  const unsigned* clusterMask = recoAlg->getClusterMask();
607  const unsigned maskLength = recoAlg->getLastNData();
608  assert(maskLength == eventData.size());
609 
610  const unsigned* candIdx = maskLength ? &candidateIndex[0] : 0;
611  for (unsigned i=0; i<maskLength; ++i)
612  {
613  // In FFTJet, the mask value of 0 corresponds to unclustered
614  // energy. We will do the same here. Jet numbers are therefore
615  // shifted by 1 wrt constituents vector, and constituents[1]
616  // corresponds to jet number 0.
617  const unsigned mask = clusterMask[i];
618  assert(mask <= nJets);
619  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
620  }
621 }
std::vector< std::vector< reco::CandidatePtr > > constituents
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< RecoAlg > recoAlg
edm::Handle< reco::CandidateView > inputCollection
std::vector< RecoFFTJet > recoJets
std::vector< unsigned > candidateIndex
std::vector< fftjetcms::VectorLike > eventData
void FFTJetProducer::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 1327 of file FFTJetProducer.cc.

1328 {
1329 }
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 234 of file FFTJetProducer.cc.

References genJetsLabel, edm::Event::getByLabel(), i, input, metsig::jet, fftjetcms::jetFromStorable(), AlCaHLTBitMon_ParallelJobs::p, resolution, and pileupReCalc_HLTpaths::scale.

Referenced by produce().

239 {
240  typedef reco::FFTAnyJet<reco::GenJet> InputJet;
241  typedef std::vector<InputJet> InputCollection;
242 
244  iEvent.getByLabel(genJetsLabel, input);
245 
246  const unsigned sz = input->size();
247  preclusters->reserve(sz);
248  for (unsigned i=0; i<sz; ++i)
249  {
250  const RecoFFTJet& jet(jetFromStorable((*input)[i].getFFTSpecific()));
251  fftjet::Peak p(jet.precluster());
252  const double scale(p.scale());
253  p.setEtaPhi(jet.vec().Eta(), jet.vec().Phi());
254  p.setMagnitude(jet.vec().Pt()/scale/scale);
255  p.setStatus(resolution);
256  if (peakSelect(p))
257  preclusters->push_back(p);
258  }
259 }
int i
Definition: DBlmapReader.cc:9
std::vector< InputItem > InputCollection
Definition: JetRecoTypes.h:61
fftjet::RecombinedJet< VectorLike > jetFromStorable(const reco::FFTJet< Real > &jet)
Definition: jetConverters.h:61
Resolution resolution
std::vector< fftjet::Peak > preclusters
static std::string const input
Definition: EdmProvDump.cc:44
fftjet::RecombinedJet< VectorLike > RecoFFTJet
Implements inheritance relationships for FFTJet jets.
Definition: FFTAnyJet.h:16
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
const edm::InputTag genJetsLabel
unsigned FFTJetProducer::iterateJetReconstruction ( )
private

Definition at line 502 of file FFTJetProducer.cc.

References checkConvergence(), fftjetcms::FFTJetInterface::energyFlow, fftjetcms::FFTJetInterface::eventData, edm::hlt::Exception, gridAlg, i, iterJets, iterPreclusters, metsig::jet, fwrapper::jets, maxIterations, memberFactorCalcJet, noiseLevel, AlCaHLTBitMon_ParallelJobs::p, preclusters, recoAlg, recoJets, recoScaleCalcJet, recoScaleRatioCalcJet, removeFakePreclusters(), ntuplemaker::status, unclustered, unused, and useGriddedAlgorithm.

Referenced by produce().

503 {
504  fftjet::Functor1<double,RecoFFTJet>& scaleCalc(*recoScaleCalcJet);
505  fftjet::Functor1<double,RecoFFTJet>& ratioCalc(*recoScaleRatioCalcJet);
506  fftjet::Functor1<double,RecoFFTJet>& factorCalc(*memberFactorCalcJet);
507 
508  unsigned nJets = recoJets.size();
509  unsigned iterNum = 1U;
510  bool converged = false;
511  for (; iterNum<maxIterations && !converged; ++iterNum)
512  {
513  // Recreate the vector of preclusters using the jets
514  const RecoFFTJet* jets = &recoJets[0];
515  iterPreclusters.clear();
516  iterPreclusters.reserve(nJets);
517  for (unsigned i=0; i<nJets; ++i)
518  {
519  const RecoFFTJet& jet(jets[i]);
520  fftjet::Peak p(jet.precluster());
521  p.setEtaPhi(jet.vec().Eta(), jet.vec().Phi());
522  p.setRecoScale(scaleCalc(jet));
523  p.setRecoScaleRatio(ratioCalc(jet));
524  p.setMembershipFactor(factorCalc(jet));
525  iterPreclusters.push_back(p);
526  }
527 
528  // Run the algorithm
529  int status = 0;
531  status = gridAlg->run(iterPreclusters, *energyFlow,
532  &noiseLevel, 1U, 1U,
534  else
535  status = recoAlg->run(iterPreclusters, eventData, &noiseLevel, 1U,
537  if (status)
538  throw cms::Exception("FFTJetInterface")
539  << "FFTJet algorithm failed" << std::endl;
540 
541  // As it turns out, it is possible, in very rare cases,
542  // to have iterJets.size() != nJets at this point
543 
544  // Figure out if the iterations have converged
545  converged = checkConvergence(recoJets, iterJets);
546 
547  // Prepare for the next cycle
548  iterJets.swap(recoJets);
549  nJets = recoJets.size();
550  }
551 
552  // Check that we have the correct number of preclusters
553  if (preclusters.size() != nJets)
554  {
555  assert(nJets < preclusters.size());
557  assert(preclusters.size() == nJets);
558  }
559 
560  // Plug in the original precluster coordinates into the result
561  RecoFFTJet* jets = &recoJets[0];
562  for (unsigned i=0; i<nJets; ++i)
563  {
564  const fftjet::Peak& oldp(preclusters[i]);
565  jets[i].setPeakEtaPhi(oldp.eta(), oldp.phi());
566  }
567 
568  // If we have converged on the last cycle, the result
569  // would be indistinguishable from no convergence.
570  // Because of this, raise the counter by one to indicate
571  // the case when the convergence is not achieved.
572  if (!converged)
573  ++iterNum;
574 
575  return iterNum;
576 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::auto_ptr< RecoAlg > recoAlg
const bool useGriddedAlgorithm
std::auto_ptr< GridAlg > gridAlg
std::vector< RecoFFTJet > recoJets
std::vector< fftjet::Peak > preclusters
fftjet::RecombinedJet< VectorLike > RecoFFTJet
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > memberFactorCalcJet
vector< PseudoJet > jets
const double noiseLevel
std::vector< RecoFFTJet > iterJets
bool checkConvergence(const std::vector< RecoFFTJet > &previousIterResult, std::vector< RecoFFTJet > &thisIterResult)
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleRatioCalcJet
tuple status
Definition: ntuplemaker.py:245
std::vector< fftjetcms::VectorLike > eventData
fftjetcms::VectorLike unclustered
std::vector< fftjet::Peak > iterPreclusters
void removeFakePreclusters()
const unsigned maxIterations
std::auto_ptr< fftjet::Functor1< double, RecoFFTJet > > recoScaleCalcJet
bool FFTJetProducer::loadEnergyFlow ( const edm::Event iEvent,
const edm::InputTag label,
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &  flow 
)
staticprivate

Definition at line 446 of file FFTJetProducer.cc.

References edm::Event::getByLabel(), input, and NULL.

Referenced by produce().

449 {
451  iEvent.getByLabel(label, input);
452 
453  // Make sure that the grid is compatible with the stored one
454  bool rebuildGrid = flow.get() == NULL;
455  if (!rebuildGrid)
456  rebuildGrid =
457  !(flow->nEta() == input->nEtaBins() &&
458  flow->nPhi() == input->nPhiBins() &&
459  flow->etaMin() == input->etaMin() &&
460  flow->etaMax() == input->etaMax() &&
461  flow->phiBin0Edge() == input->phiBin0Edge());
462  if (rebuildGrid)
463  {
464  // We should not get here very often...
465  flow = std::auto_ptr<fftjet::Grid2d<Real> >(
466  new fftjet::Grid2d<Real>(
467  input->nEtaBins(), input->etaMin(), input->etaMax(),
468  input->nPhiBins(), input->phiBin0Edge(), input->title()));
469  }
470  flow->blockSet(input->data(), input->nEtaBins(), input->nPhiBins());
471  return rebuildGrid;
472 }
#define NULL
Definition: scimark2.h:8
static std::string const input
Definition: EdmProvDump.cc:44
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
template<class Real >
void FFTJetProducer::loadSparseTreeData ( const edm::Event iEvent)
private

Definition at line 216 of file FFTJetProducer.cc.

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

217 {
219 
220  // Get the input
222  iEvent.getByLabel(treeLabel, input);
223 
224  if (!input->isSparse())
225  throw cms::Exception("FFTJetBadConfig")
226  << "The stored clustering tree is not sparse" << std::endl;
227 
230  sparseTree.sortNodes();
231 }
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:18
static std::string const input
Definition: EdmProvDump.cc:44
std::auto_ptr< std::vector< double > > iniScales
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
const edm::InputTag treeLabel
void sparsePeakTreeFromStorable(const reco::PattRecoTree< Real, reco::PattRecoPeak< Real > > &in, const std::vector< double > *scaleSetIfNotAdaptive, double completeEventScale, fftjet::SparseClusteringTree< fftjet::Peak, long > *out)
SparseTree sparseTree
template<typename T >
void FFTJetProducer::makeProduces ( const std::string &  alias,
const std::string &  tag 
)
private

Definition at line 132 of file FFTJetProducer.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by FFTJetProducer().

134 {
135  produces<std::vector<reco::FFTAnyJet<T> > >(tag).setBranchAlias(alias);
136 }
FFTJetProducer& FFTJetProducer::operator= ( const FFTJetProducer )
private
std::auto_ptr< AbsBgFunctor > FFTJetProducer::parse_bgMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 899 of file FFTJetProducer.cc.

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

Referenced by beginJob().

900 {
902  ps.getParameter<edm::ParameterSet>("bgMembershipFunction"));
903 }
T getParameter(std::string const &) const
std::auto_ptr< AbsBgFunctor > fftjet_BgFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor2< double, FFTJetProducer::RecoFFTJet, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_jetDistanceCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 968 of file FFTJetProducer.cc.

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

Referenced by beginJob().

969 {
971  ps.getParameter<edm::ParameterSet>("jetDistanceCalc"));
972 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor2< double, fftjet::RecombinedJet< VectorLike >, fftjet::RecombinedJet< VectorLike > > > fftjet_JetDistance_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::ScaleSpaceKernel > FFTJetProducer::parse_jetMembershipFunction ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 890 of file FFTJetProducer.cc.

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

Referenced by beginJob().

891 {
893  ps.getParameter<edm::ParameterSet>("jetMembershipFunction"));
894 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::ScaleSpaceKernel > fftjet_MembershipFunction_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_memberFactorCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 959 of file FFTJetProducer.cc.

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

Referenced by beginJob().

960 {
962  ps.getParameter<edm::ParameterSet>("memberFactorCalcJet"));
963 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_memberFactorCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 935 of file FFTJetProducer.cc.

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

Referenced by beginJob().

936 {
938  ps.getParameter<edm::ParameterSet>("memberFactorCalcPeak"));
939 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< bool, fftjet::Peak > > FFTJetProducer::parse_peakSelector ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 881 of file FFTJetProducer.cc.

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

Referenced by beginJob().

882 {
884  ps.getParameter<edm::ParameterSet>("PeakSelectorConfiguration"));
885 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< bool, fftjet::Peak > > fftjet_PeakSelector_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjetcms::AbsPileupCalculator > FFTJetProducer::parse_pileupDensityCalc ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 917 of file FFTJetProducer.cc.

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

Referenced by beginJob().

918 {
920  ps.getParameter<edm::ParameterSet>("pileupDensityCalc"));
921 }
T getParameter(std::string const &) const
std::auto_ptr< AbsPileupCalculator > fftjet_PileupCalculator_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 943 of file FFTJetProducer.cc.

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

Referenced by beginJob().

944 {
946  ps.getParameter<edm::ParameterSet>("recoScaleCalcJet"));
947 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 908 of file FFTJetProducer.cc.

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

Referenced by beginJob().

909 {
911  ps.getParameter<edm::ParameterSet>("recoScaleCalcPeak"));
912 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, FFTJetProducer::RecoFFTJet > > FFTJetProducer::parse_recoScaleRatioCalcJet ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 951 of file FFTJetProducer.cc.

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

Referenced by beginJob().

952 {
954  ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcJet"));
955 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::RecombinedJet< VectorLike > > > fftjet_JetFunctor_parser(const edm::ParameterSet &ps)
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > FFTJetProducer::parse_recoScaleRatioCalcPeak ( const edm::ParameterSet ps)
protectedvirtual

Definition at line 926 of file FFTJetProducer.cc.

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

Referenced by beginJob().

927 {
929  ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcPeak"));
930 }
T getParameter(std::string const &) const
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > fftjet_PeakFunctor_parser(const edm::ParameterSet &ps)
FFTJetProducer::Resolution FFTJetProducer::parse_resolution ( const std::string &  name)
static

Definition at line 111 of file FFTJetProducer.cc.

References edm::hlt::Exception.

113 {
114  if (!name.compare("fixed"))
115  return FIXED;
116  else if (!name.compare("maximallyStable"))
117  return MAXIMALLY_STABLE;
118  else if (!name.compare("globallyAdaptive"))
119  return GLOBALLY_ADAPTIVE;
120  else if (!name.compare("locallyAdaptive"))
121  return LOCALLY_ADAPTIVE;
122  else if (!name.compare("fromGenJets"))
123  return FROM_GENJETS;
124  else
125  throw cms::Exception("FFTJetBadConfig")
126  << "Invalid resolution specification \""
127  << name << "\"" << std::endl;
128 }
void FFTJetProducer::prepareRecombinationScales ( )
private

Definition at line 399 of file FFTJetProducer.cc.

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

Referenced by produce().

400 {
401  const unsigned nClus = preclusters.size();
402  if (nClus)
403  {
404  fftjet::Peak* clus = &preclusters[0];
405  fftjet::Functor1<double,fftjet::Peak>&
406  scaleCalc(*recoScaleCalcPeak);
407  fftjet::Functor1<double,fftjet::Peak>&
408  ratioCalc(*recoScaleRatioCalcPeak);
409  fftjet::Functor1<double,fftjet::Peak>&
410  factorCalc(*memberFactorCalcPeak);
411 
412  for (unsigned i=0; i<nClus; ++i)
413  {
414  clus[i].setRecoScale(scaleCalc(clus[i]));
415  clus[i].setRecoScaleRatio(ratioCalc(clus[i]));
416  clus[i].setMembershipFactor(factorCalc(clus[i]));
417  }
418  }
419 }
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > memberFactorCalcPeak
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleCalcPeak
std::vector< fftjet::Peak > preclusters
std::auto_ptr< fftjet::Functor1< double, fftjet::Peak > > recoScaleRatioCalcPeak
void FFTJetProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
protectedvirtual

Implements edm::EDProducer.

Definition at line 759 of file FFTJetProducer.cc.

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

761 {
762  // Load the clustering tree made by FFTJetPatRecoProducer
764  loadSparseTreeData<float>(iEvent);
765  else
766  loadSparseTreeData<double>(iEvent);
767 
768  // Do we need to load the candidate collection?
770  loadInputCollection(iEvent);
771 
772  // Do we need to have discretized energy flow?
774  {
775  if (reuseExistingGrid)
776  {
777  if (loadEnergyFlow(iEvent, treeLabel, energyFlow))
778  buildGridAlg();
779  }
780  else
782  }
783 
784  // Calculate cluster occupancy as a function of level number
785  sparseTree.occupancyInScaleSpace(*peakSelector, &occupancy);
786 
787  // Select the preclusters using the requested resolution scheme
788  preclusters.clear();
789  if (resolution == FROM_GENJETS)
790  genJetPreclusters(sparseTree, iEvent, iSetup,
792  else
794  if (preclusters.size() > maxInitialPreclusters)
795  {
796  std::sort(preclusters.begin(), preclusters.end(), std::greater<fftjet::Peak>());
798  }
799 
800  // Prepare to run the jet recombination procedure
802 
803  // Assign membership functions to preclusters. If this function
804  // is not overriden in a derived class, default algorithm membership
805  // function will be used for every cluster.
807 
808  // Count the preclusters going in
809  unsigned nPreclustersFound = 0U;
810  const unsigned npre = preclusters.size();
811  for (unsigned i=0; i<npre; ++i)
812  if (preclusters[i].membershipFactor() > 0.0)
813  ++nPreclustersFound;
814 
815  // Run the recombination algorithm once
816  int status = 0;
818  status = gridAlg->run(preclusters, *energyFlow,
819  &noiseLevel, 1U, 1U,
821  else
822  status = recoAlg->run(preclusters, eventData, &noiseLevel, 1U,
824  if (status)
825  throw cms::Exception("FFTJetInterface")
826  << "FFTJet algorithm failed (first iteration)" << std::endl;
827 
828  // If requested, iterate the jet recombination procedure
829  if (maxIterations > 1U && !recoJets.empty())
830  {
831  // It is possible to have a smaller number of jets than we had
832  // preclusters. Fake preclusters are possible, but for a good
833  // choice of pattern recognition kernel their presence should
834  // be infrequent. However, any fake preclusters will throw the
835  // iterative reconstruction off balance. Deal with the problem now.
836  const unsigned nJets = recoJets.size();
837  if (preclusters.size() != nJets)
838  {
839  assert(nJets < preclusters.size());
841  }
843  }
844  else
845  iterationsPerformed = 1U;
846 
847  // Determine jet constituents. FFTJet returns a map
848  // of constituents which is inverse to what we need here.
849  const unsigned nJets = recoJets.size();
850  if (constituents.size() <= nJets)
851  constituents.resize(nJets + 1U);
852  if (assignConstituents)
853  {
854  for (unsigned i=0; i<=nJets; ++i)
855  constituents[i].clear();
858  else
860  }
861 
862  // Figure out the pile-up
863  if (calculatePileup)
864  {
865  if (loadPileupFromDB)
866  determinePileupDensityFromDB(iEvent, iSetup,
868  else
871  determinePileup();
872  assert(pileup.size() == recoJets.size());
873  }
874 
875  // Write out the results
876  saveResults(iEvent, iSetup, nPreclustersFound);
877 }
std::vector< std::vector< reco::CandidatePtr > > constituents
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::auto_ptr< RecoAlg > recoAlg
unsigned iterationsPerformed
const bool useGriddedAlgorithm
std::vector< fftjetcms::VectorLike > pileup
void saveResults(edm::Event &iEvent, const edm::EventSetup &, unsigned nPreclustersFound)
std::auto_ptr< GridAlg > gridAlg
virtual void assignMembershipFunctions(std::vector< fftjet::Peak > *preclusters)
void loadInputCollection(const edm::Event &)
virtual void determinePileupDensityFromDB(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
Resolution resolution
std::vector< RecoFFTJet > recoJets
std::vector< unsigned > occupancy
std::vector< fftjet::Peak > preclusters
void determineVectorConstituents()
const bool reuseExistingGrid
int iEvent
Definition: GenABIO.cc:243
virtual void determinePileupDensityFromConfig(const edm::Event &iEvent, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &density)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
const double noiseLevel
unsigned iterateJetReconstruction()
const bool calculatePileup
const bool assignConstituents
bool storeInSinglePrecision() const
const edm::InputTag treeLabel
virtual void selectPreclusters(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
const unsigned maxInitialPreclusters
SparseTree sparseTree
void determineGriddedConstituents()
const edm::InputTag pileupLabel
virtual void genJetPreclusters(const SparseTree &tree, edm::Event &, const edm::EventSetup &, const fftjet::Functor1< bool, fftjet::Peak > &peakSelector, std::vector< fftjet::Peak > *preclusters)
static bool loadEnergyFlow(const edm::Event &iEvent, const edm::InputTag &label, std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > &flow)
tuple status
Definition: ntuplemaker.py:245
std::vector< fftjetcms::VectorLike > eventData
fftjetcms::VectorLike unclustered
std::auto_ptr< fftjet::Functor1< bool, fftjet::Peak > > peakSelector
void removeFakePreclusters()
const unsigned maxIterations
void prepareRecombinationScales()
void FFTJetProducer::removeFakePreclusters ( )
private

Definition at line 1070 of file FFTJetProducer.cc.

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

Referenced by iterateJetReconstruction(), and produce().

1071 {
1072  // There are two possible reasons for fake preclusters:
1073  // 1. Membership factor was set to 0
1074  // 2. Genuine problem with pattern recognition
1075  //
1076  // Anyway, we need to match jets to preclusters and keep
1077  // only those preclusters that have been matched
1078  //
1079  std::vector<int> matchTable;
1080  const unsigned nmatched = matchOneToOne(
1081  recoJets, preclusters, JetToPeakDistance(), &matchTable);
1082 
1083  // Ensure that all jets have been matched.
1084  // If not, we must have a bug somewhere.
1085  assert(nmatched == recoJets.size());
1086 
1087  // Collect all matched preclusters
1088  iterPreclusters.clear();
1089  iterPreclusters.reserve(nmatched);
1090  for (unsigned i=0; i<nmatched; ++i)
1091  iterPreclusters.push_back(preclusters[matchTable[i]]);
1093 }
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:41
int i
Definition: DBlmapReader.cc:9
std::vector< RecoFFTJet > recoJets
std::vector< fftjet::Peak > preclusters
std::vector< fftjet::Peak > iterPreclusters
void FFTJetProducer::saveResults ( edm::Event iEvent,
const edm::EventSetup iSetup,
unsigned  nPreclustersFound 
)
private

Definition at line 723 of file FFTJetProducer.cc.

References constituents, i, iterationsPerformed, jet_type_switch, maxIterations, maxLevel, minLevel, occupancy, fftjetcms::FFTJetInterface::outputLabel, p4, edm::Event::put(), resumConstituents, sparseTree, edmLumisInFiles::summary, thresholds, unclustered, unused, usedLevel, and writeJets().

Referenced by produce().

725 {
726  // Write recombined jets
727  jet_type_switch(writeJets, ev, iSetup);
728 
729  // Check if we should resum unclustered energy constituents
730  VectorLike unclusE(unclustered);
731  if (resumConstituents)
732  {
733  VectorLike sum(0.0, 0.0, 0.0, 0.0);
734  const unsigned nCon = constituents[0].size();
735  const reco::CandidatePtr* cn = nCon ? &constituents[0][0] : 0;
736  for (unsigned i=0; i<nCon; ++i)
737  sum += cn[i]->p4();
738  unclusE = sum;
739  }
740 
741  // Write the jet reconstruction summary
742  const double minScale = minLevel ? sparseTree.getScale(minLevel) : 0.0;
743  const double maxScale = maxLevel ? sparseTree.getScale(maxLevel) : 0.0;
744  const double scaleUsed = usedLevel ? sparseTree.getScale(usedLevel) : 0.0;
745 
746  std::auto_ptr<reco::FFTJetProducerSummary> summary(
748  thresholds, occupancy, unclusE,
749  constituents[0], unused,
750  minScale, maxScale, scaleUsed,
751  nPreclustersFound, iterationsPerformed,
752  iterationsPerformed == 1U ||
754  ev.put(summary, outputLabel);
755 }
std::vector< std::vector< reco::CandidatePtr > > constituents
int i
Definition: DBlmapReader.cc:9
unsigned iterationsPerformed
const bool resumConstituents
Data processing summary generated by FFTJetProducer.
std::vector< unsigned > occupancy
math::XYZTLorentzVector VectorLike
unsigned usedLevel
double p4[4]
Definition: TauolaWrapper.h:92
std::vector< double > thresholds
SparseTree sparseTree
void writeJets(edm::Event &iEvent, const edm::EventSetup &)
#define jet_type_switch(method, arg1, arg2)
const std::string outputLabel
fftjetcms::VectorLike unclustered
const unsigned maxIterations
void FFTJetProducer::selectPreclusters ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelector,
std::vector< fftjet::Peak > *  preclusters 
)
protectedvirtual

Definition at line 262 of file FFTJetProducer.cc.

References i, nodes, resolution, selectTreeNodes(), and sparseTree.

Referenced by produce().

266 {
267  nodes.clear();
268  selectTreeNodes(tree, peakSelect, &nodes);
269 
270  // Fill out the vector of preclusters using the tree node ids
271  const unsigned nNodes = nodes.size();
272  const SparseTree::NodeId* pnodes = nNodes ? &nodes[0] : 0;
273  preclusters->reserve(nNodes);
274  for (unsigned i=0; i<nNodes; ++i)
275  preclusters->push_back(
276  sparseTree.uncheckedNode(pnodes[i]).getCluster());
277 
278  // Remember the node id in the precluster and set
279  // the status word to indicate the resolution scheme used
280  fftjet::Peak* clusters = nNodes ? &(*preclusters)[0] : 0;
281  for (unsigned i=0; i<nNodes; ++i)
282  {
283  clusters[i].setCode(pnodes[i]);
284  clusters[i].setStatus(resolution);
285  }
286 }
int i
Definition: DBlmapReader.cc:9
void selectTreeNodes(const SparseTree &tree, const fftjet::Functor1< bool, fftjet::Peak > &peakSelect, std::vector< SparseTree::NodeId > *nodes)
Resolution resolution
std::vector< fftjet::Peak > preclusters
SparseTree sparseTree
std::vector< SparseTree::NodeId > nodes
void FFTJetProducer::selectTreeNodes ( const SparseTree tree,
const fftjet::Functor1< bool, fftjet::Peak > &  peakSelect,
std::vector< SparseTree::NodeId > *  nodes 
)
protected

Definition at line 289 of file FFTJetProducer.cc.

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

Referenced by selectPreclusters().

293 {
294  minLevel = maxLevel = usedLevel = 0;
295 
296  // Get the tree nodes which pass the cuts
297  // (according to the selected resolution strategy)
298  switch (resolution)
299  {
300  case FIXED:
301  {
302  usedLevel = tree.getLevel(fixedScale);
303  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
304  }
305  break;
306 
307  case MAXIMALLY_STABLE:
308  {
309  const unsigned minStartingLevel = maxStableScale > 0.0 ?
310  tree.getLevel(maxStableScale) : 0;
311  const unsigned maxStartingLevel = minStableScale > 0.0 ?
312  tree.getLevel(minStableScale) : UINT_MAX;
313 
314  if (tree.stableClusterCount(
315  peakSelect, &minLevel, &maxLevel, stabilityAlpha,
316  minStartingLevel, maxStartingLevel))
317  {
318  usedLevel = (minLevel + maxLevel)/2;
319  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
320  }
321  }
322  break;
323 
324  case GLOBALLY_ADAPTIVE:
325  {
326  const bool stable = tree.clusterCountLevels(
327  nClustersRequested, peakSelect, &minLevel, &maxLevel);
328  if (minLevel || maxLevel)
329  {
330  usedLevel = (minLevel + maxLevel)/2;
331  if (!stable)
332  {
333  const int maxlev = tree.maxStoredLevel();
334  bool levelFound = false;
335  for (int delta=0; delta<=maxlev && !levelFound; ++delta)
336  for (int ifac=1; ifac>-2 && !levelFound; ifac-=2)
337  {
338  const int level = usedLevel + ifac*delta;
339  if (level > 0 && level <= maxlev)
340  if (occupancy[level] == nClustersRequested)
341  {
342  usedLevel = level;
343  levelFound = true;
344  }
345  }
346  assert(levelFound);
347  }
348  }
349  else
350  {
351  // Can't find that exact number of preclusters.
352  // Try to get the next best thing.
353  usedLevel = 1;
354  const unsigned occ1 = occupancy[1];
355  if (nClustersRequested >= occ1)
356  {
357  const unsigned maxlev = tree.maxStoredLevel();
358  if (nClustersRequested > occupancy[maxlev])
359  usedLevel = maxlev;
360  else
361  {
362  // It would be nice to use "lower_bound" here,
363  // but the occupancy is not necessarily monotonous.
364  unsigned bestDelta = nClustersRequested > occ1 ?
365  nClustersRequested - occ1 : occ1 - nClustersRequested;
366  for (unsigned level=2; level<=maxlev; ++level)
367  {
368  const unsigned n = occupancy[level];
369  const unsigned d = nClustersRequested > n ?
370  nClustersRequested - n : n - nClustersRequested;
371  if (d < bestDelta)
372  {
373  bestDelta = d;
374  usedLevel = level;
375  }
376  }
377  }
378  }
379  }
380  tree.getPassingNodes(usedLevel, peakSelect, mynodes);
381  }
382  break;
383 
384  case LOCALLY_ADAPTIVE:
385  {
386  usedLevel = tree.getLevel(fixedScale);
387  tree.getMagS2OptimalNodes(peakSelect, nClustersRequested,
388  usedLevel, mynodes, &thresholds);
389  }
390  break;
391 
392  default:
393  assert(!"ERROR in FFTJetProducer::selectTreeNodes : "
394  "should never get here! This is a bug. Please report.");
395  }
396 }
dbl * delta
Definition: mlp_gen.cc:36
static const int stable
Definition: TopGenEvent.h:11
const double fixedScale
Resolution resolution
std::vector< unsigned > occupancy
const double minStableScale
const double maxStableScale
const unsigned nClustersRequested
unsigned usedLevel
std::vector< double > thresholds
const double stabilityAlpha
tuple level
Definition: testEve_cfg.py:34
void FFTJetProducer::setJetStatusBit ( RecoFFTJet jet,
int  mask,
bool  value 
)
staticprivate

Definition at line 1096 of file FFTJetProducer.cc.

References ntuplemaker::status.

Referenced by writeJets().

1098 {
1099  int status = jet->status();
1100  if (value)
1101  status |= mask;
1102  else
1103  status &= ~mask;
1104  jet->setStatus(status);
1105 }
tuple status
Definition: ntuplemaker.py:245
template<typename T >
void FFTJetProducer::writeJets ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 627 of file FFTJetProducer.cc.

References fftjetcms::adjustForPileup(), calculatePileup, cellCountsVec, constituents, CONSTITUENTS_RESUMMED, fftjetcms::FFTJetInterface::energyFlow, i, metsig::jet, fwrapper::jets, fftjetcms::FFTJetInterface::outputLabel, p4, pileup, PILEUP_CALCULATED, PILEUP_SUBTRACTED_4VEC, PILEUP_SUBTRACTED_PT, pileupEnergyFlow, RecoTauCleanerPlugins::pt, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, recoJets, recombinationDataCutoff, resumConstituents, reco::FFTJet< Real >::setFourVec(), setJetStatusBit(), reco::FFTJet< Real >::setNCells(), reco::FFTJet< Real >::setPileup(), python.multivaluedict::sort(), subtractPileup, subtractPileupAs4Vec, useGriddedAlgorithm, fftjetcms::FFTJetInterface::vertexUsed(), and reco::writeSpecific().

Referenced by saveResults().

629 {
630  using namespace reco;
631 
632  typedef FFTAnyJet<T> OutputJet;
633  typedef std::vector<OutputJet> OutputCollection;
634 
635  // Area of a single eta-phi cell for jet area calculations.
636  // Set it to 0 in case the module configuration does not allow
637  // us to calculate jet areas reliably.
638  double cellArea = useGriddedAlgorithm &&
640  energyFlow->etaBinWidth() * energyFlow->phiBinWidth() : 0.0;
641 
642  if (calculatePileup)
643  cellArea = pileupEnergyFlow->etaBinWidth() *
644  pileupEnergyFlow->phiBinWidth();
645 
646  // allocate output jet collection
647  std::auto_ptr<OutputCollection> jets(new OutputCollection());
648  const unsigned nJets = recoJets.size();
649  jets->reserve(nJets);
650 
651  bool sorted = true;
652  double previousPt = DBL_MAX;
653  for (unsigned ijet=0; ijet<nJets; ++ijet)
654  {
655  RecoFFTJet& myjet(recoJets[ijet]);
656 
657  // Check if we should resum jet constituents
658  VectorLike jet4vec(myjet.vec());
659  if (resumConstituents)
660  {
661  VectorLike sum(0.0, 0.0, 0.0, 0.0);
662  const unsigned nCon = constituents[ijet+1].size();
663  const reco::CandidatePtr* cn = nCon ? &constituents[ijet+1][0] : 0;
664  for (unsigned i=0; i<nCon; ++i)
665  sum += cn[i]->p4();
666  jet4vec = sum;
667  setJetStatusBit(&myjet, CONSTITUENTS_RESUMMED, true);
668  }
669 
670  // Subtract the pile-up
672  {
673  jet4vec = adjustForPileup(jet4vec, pileup[ijet],
677  else
678  setJetStatusBit(&myjet, PILEUP_SUBTRACTED_PT, true);
679  }
680 
681  // Write the specifics to the jet (simultaneously sets 4-vector,
682  // vertex, constituents). These are overridden functions that will
683  // call the appropriate specific code.
684  T jet;
685  writeSpecific(jet, jet4vec, vertexUsed(),
686  constituents[ijet+1], iSetup);
687 
688  // calcuate the jet area
689  double ncells = myjet.ncells();
690  if (calculatePileup)
691  {
692  ncells = cellCountsVec[ijet];
693  setJetStatusBit(&myjet, PILEUP_CALCULATED, true);
694  }
695  jet.setJetArea(cellArea*ncells);
696 
697  // add jet to the list
698  FFTJet<float> fj(jetToStorable<float>(myjet));
699  fj.setFourVec(jet4vec);
700  if (calculatePileup)
701  {
702  fj.setPileup(pileup[ijet]);
703  fj.setNCells(ncells);
704  }
705  jets->push_back(OutputJet(jet, fj));
706 
707  // Check whether the sequence remains sorted by pt
708  const double pt = jet.pt();
709  if (pt > previousPt)
710  sorted = false;
711  previousPt = pt;
712  }
713 
714  // Sort the collection
715  if (!sorted)
716  std::sort(jets->begin(), jets->end(), LocalSortByPt());
717 
718  // put the collection into the event
719  iEvent.put(jets, outputLabel);
720 }
std::vector< std::vector< reco::CandidatePtr > > constituents
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > pileupEnergyFlow
int i
Definition: DBlmapReader.cc:9
std::auto_ptr< fftjet::Grid2d< fftjetcms::Real > > energyFlow
std::vector< ProtoJet > OutputCollection
Definition: JetRecoTypes.h:62
const bool useGriddedAlgorithm
std::vector< fftjetcms::VectorLike > pileup
const bool resumConstituents
const reco::Particle::Point & vertexUsed() const
const bool subtractPileupAs4Vec
const bool subtractPileup
std::vector< RecoFFTJet > recoJets
const double recombinationDataCutoff
fftjet::RecombinedJet< VectorLike > RecoFFTJet
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
math::XYZTLorentzVector VectorLike
double p4[4]
Definition: TauolaWrapper.h:92
vector< PseudoJet > jets
Implements inheritance relationships for FFTJet jets.
Definition: FFTAnyJet.h:16
static void setJetStatusBit(RecoFFTJet *jet, int mask, bool value)
std::vector< unsigned > cellCountsVec
const bool calculatePileup
long double T
const std::string outputLabel
math::XYZTLorentzVector adjustForPileup(const math::XYZTLorentzVector &jet, const math::XYZTLorentzVector &pileup, bool subtractPileupAs4Vec)
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:41

Member Data Documentation

const bool FFTJetProducer::assignConstituents
private

Definition at line 261 of file FFTJetProducer.h.

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

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

Definition at line 337 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const bool FFTJetProducer::calculatePileup
private

Definition at line 270 of file FFTJetProducer.h.

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

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

Definition at line 404 of file FFTJetProducer.h.

Referenced by determinePileup(), and writeJets().

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

Definition at line 258 of file FFTJetProducer.h.

Referenced by checkConvergence().

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

Definition at line 403 of file FFTJetProducer.h.

Referenced by determinePileup().

const double FFTJetProducer::fixedScale
private

Definition at line 279 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::InputTag FFTJetProducer::genJetsLabel
private

Definition at line 305 of file FFTJetProducer.h.

Referenced by genJetPreclusters().

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

Definition at line 296 of file FFTJetProducer.h.

Referenced by buildGridAlg().

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

Definition at line 325 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadSparseTreeData().

const bool FFTJetProducer::isCrisp
private

Definition at line 300 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::iterationsPerformed
private

Definition at line 384 of file FFTJetProducer.h.

Referenced by produce(), and saveResults().

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

Definition at line 383 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction().

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

Definition at line 382 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and removeFakePreclusters().

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

Definition at line 357 of file FFTJetProducer.h.

Referenced by beginJob(), and checkConvergence().

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

Definition at line 336 of file FFTJetProducer.h.

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

bool FFTJetProducer::loadPileupFromDB
private

Definition at line 322 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

const unsigned FFTJetProducer::maxInitialPreclusters
private

Definition at line 310 of file FFTJetProducer.h.

Referenced by produce().

const unsigned FFTJetProducer::maxIterations
private

Definition at line 254 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::maxLevel
private

Definition at line 375 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::maxStableScale
private

Definition at line 283 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

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

Definition at line 352 of file FFTJetProducer.h.

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

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

Definition at line 347 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

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

Definition at line 402 of file FFTJetProducer.h.

Referenced by determinePileup().

unsigned FFTJetProducer::minLevel
private

Definition at line 375 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::minStableScale
private

Definition at line 282 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::ParameterSet FFTJetProducer::myConfiguration
private

Definition at line 240 of file FFTJetProducer.h.

Referenced by beginJob().

const unsigned FFTJetProducer::nClustersRequested
private

Definition at line 293 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const unsigned FFTJetProducer::nJetsRequiredToConverge
private

Definition at line 257 of file FFTJetProducer.h.

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

Definition at line 360 of file FFTJetProducer.h.

Referenced by selectPreclusters().

const double FFTJetProducer::noiseLevel
private

Definition at line 290 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and produce().

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

Definition at line 369 of file FFTJetProducer.h.

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

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

Definition at line 331 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

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

Definition at line 391 of file FFTJetProducer.h.

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

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

Definition at line 399 of file FFTJetProducer.h.

Referenced by beginJob(), and determinePileupDensityFromConfig().

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

Definition at line 396 of file FFTJetProducer.h.

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

const edm::InputTag FFTJetProducer::pileupLabel
private

Definition at line 276 of file FFTJetProducer.h.

Referenced by produce().

std::string FFTJetProducer::pileupTableCategory
private

Definition at line 321 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableName
private

Definition at line 320 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableRecord
private

Definition at line 319 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

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

Definition at line 299 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const double FFTJetProducer::recombinationDataCutoff
private

Definition at line 302 of file FFTJetProducer.h.

Referenced by buildGridAlg(), and writeJets().

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

Definition at line 350 of file FFTJetProducer.h.

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

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

Definition at line 340 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

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

Definition at line 351 of file FFTJetProducer.h.

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

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

Definition at line 344 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

Resolution FFTJetProducer::resolution
private

Definition at line 315 of file FFTJetProducer.h.

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

const bool FFTJetProducer::resumConstituents
private

Definition at line 266 of file FFTJetProducer.h.

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

const bool FFTJetProducer::reuseExistingGrid
private

Definition at line 251 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

SparseTree FFTJetProducer::sparseTree
private

Definition at line 328 of file FFTJetProducer.h.

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

const double FFTJetProducer::stabilityAlpha
private

Definition at line 286 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const bool FFTJetProducer::subtractPileup
private

Definition at line 271 of file FFTJetProducer.h.

Referenced by writeJets().

const bool FFTJetProducer::subtractPileupAs4Vec
private

Definition at line 272 of file FFTJetProducer.h.

Referenced by writeJets().

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

Definition at line 372 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const edm::InputTag FFTJetProducer::treeLabel
private

Definition at line 243 of file FFTJetProducer.h.

Referenced by loadSparseTreeData(), and produce().

fftjetcms::VectorLike FFTJetProducer::unclustered
private

Definition at line 378 of file FFTJetProducer.h.

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

const double FFTJetProducer::unlikelyBgWeight
private

Definition at line 301 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

double FFTJetProducer::unused
private

Definition at line 379 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::usedLevel
private

Definition at line 375 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const bool FFTJetProducer::useGriddedAlgorithm
private

Definition at line 247 of file FFTJetProducer.h.

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