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
 
typedef WorkerT< EDProducerWorkerType
 
- 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 ()
 
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 ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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::EDProducer
CurrentProcessingContext const * currentContext () const
 
- 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 58 of file FFTJetProducer.h.

Member Typedef Documentation

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

Definition at line 175 of file FFTJetProducer.h.

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

Definition at line 173 of file FFTJetProducer.h.

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

Definition at line 62 of file FFTJetProducer.h.

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

Definition at line 63 of file FFTJetProducer.h.

Member Enumeration Documentation

Enumerator
FIXED 
MAXIMALLY_STABLE 
GLOBALLY_ADAPTIVE 
LOCALLY_ADAPTIVE 
FROM_GENJETS 

Definition at line 77 of file FFTJetProducer.h.

Enumerator
RESOLUTION 
CONSTITUENTS_RESUMMED 
PILEUP_CALCULATED 
PILEUP_SUBTRACTED_4VEC 
PILEUP_SUBTRACTED_PT 

Definition at line 68 of file FFTJetProducer.h.

Constructor & Destructor Documentation

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

Definition at line 142 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.

143  : FFTJetInterface(ps),
144  myConfiguration(ps),
148  init_param(unsigned, maxIterations),
154  init_param(bool, subtractPileup),
157  init_param(double, fixedScale),
158  init_param(double, minStableScale),
159  init_param(double, maxStableScale),
160  init_param(double, stabilityAlpha),
161  init_param(double, noiseLevel),
162  init_param(unsigned, nClustersRequested),
163  init_param(double, gridScanMaxEta),
165  init_param(bool, isCrisp),
166  init_param(double, unlikelyBgWeight),
175 
176  minLevel(0),
177  maxLevel(0),
178  usedLevel(0),
179  unused(0.0),
181  constituents(200)
182 {
183  // Check that the settings make sense
185  throw cms::Exception("FFTJetBadConfig")
186  << "Can't resum constituents if they are not assigned"
187  << std::endl;
188 
189  produces<reco::FFTJetProducerSummary>(outputLabel);
191  "alias", outputLabel));
193 
194  // Build the set of pattern recognition scales.
195  // This is needed in order to read the clustering tree
196  // from the event record.
198  ps.getParameter<edm::ParameterSet>("InitialScales"));
199  checkConfig(iniScales, "invalid set of scales");
200  std::sort(iniScales->begin(), iniScales->end(), std::greater<double>());
201 
202  // Most of the configuration has to be performed inside
203  // the "beginJob" method. This is because chaining of the
204  // parsers between this base class and the derived classes
205  // can not work from the constructor of the base class.
206 }
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 209 of file FFTJetProducer.cc.

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

Member Function Documentation

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

Definition at line 976 of file FFTJetProducer.cc.

Referenced by produce().

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

Reimplemented from edm::EDProducer.

Definition at line 982 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.

983 {
985 
986  // Parse the peak selector definition
988  checkConfig(peakSelector, "invalid peak selector");
989 
991  checkConfig(jetMembershipFunction, "invalid jet membership function");
992 
994  checkConfig(bgMembershipFunction, "invalid noise membership function");
995 
996  // Build the energy recombination algorithm
997  if (!useGriddedAlgorithm)
998  {
999  fftjet::DefaultVectorRecombinationAlgFactory<
1000  VectorLike,BgData,VBuilder> factory;
1001  if (factory[recombinationAlgorithm] == NULL)
1002  throw cms::Exception("FFTJetBadConfig")
1003  << "Invalid vector recombination algorithm \""
1004  << recombinationAlgorithm << "\"" << std::endl;
1005  recoAlg = std::auto_ptr<RecoAlg>(
1006  factory[recombinationAlgorithm]->create(
1007  jetMembershipFunction.get(),
1008  &VectorLike::Et, &VectorLike::Eta, &VectorLike::Phi,
1009  bgMembershipFunction.get(),
1011  }
1012  else if (!reuseExistingGrid)
1013  {
1015  ps.getParameter<edm::ParameterSet>("GridConfiguration"));
1016  checkConfig(energyFlow, "invalid discretization grid");
1017  buildGridAlg();
1018  }
1019 
1020  // Create the grid subsequently used for pile-up subtraction
1021  if (calculatePileup)
1022  {
1024  ps.getParameter<edm::ParameterSet>("PileupGridConfiguration"));
1025  checkConfig(pileupEnergyFlow, "invalid pileup density grid");
1026 
1027  if (!loadPileupFromDB)
1028  {
1030  checkConfig(pileupDensityCalc, "invalid pile-up density calculator");
1031  }
1032  }
1033 
1034  // Parse the calculator of the recombination scale
1036  checkConfig(recoScaleCalcPeak, "invalid spec for the "
1037  "reconstruction scale calculator from peaks");
1038 
1039  // Parse the calculator of the recombination scale ratio
1041  checkConfig(recoScaleRatioCalcPeak, "invalid spec for the "
1042  "reconstruction scale ratio calculator from peaks");
1043 
1044  // Calculator for the membership function factor
1046  checkConfig(memberFactorCalcPeak, "invalid spec for the "
1047  "membership function factor calculator from peaks");
1048 
1049  if (maxIterations > 1)
1050  {
1051  // We are going to run iteratively. Make required objects.
1053  checkConfig(recoScaleCalcJet, "invalid spec for the "
1054  "reconstruction scale calculator from jets");
1055 
1057  checkConfig(recoScaleRatioCalcJet, "invalid spec for the "
1058  "reconstruction scale ratio calculator from jets");
1059 
1061  checkConfig(memberFactorCalcJet, "invalid spec for the "
1062  "membership function factor calculator from jets");
1063 
1065  checkConfig(memberFactorCalcJet, "invalid spec for the "
1066  "jet distance calculator");
1067  }
1068 }
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 423 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().

424 {
425  int minBin = energyFlow->getEtaBin(-gridScanMaxEta);
426  if (minBin < 0)
427  minBin = 0;
428  int maxBin = energyFlow->getEtaBin(gridScanMaxEta) + 1;
429  if (maxBin < 0)
430  maxBin = 0;
431 
432  fftjet::DefaultRecombinationAlgFactory<
433  Real,VectorLike,BgData,VBuilder> factory;
434  if (factory[recombinationAlgorithm] == NULL)
435  throw cms::Exception("FFTJetBadConfig")
436  << "Invalid grid recombination algorithm \""
437  << recombinationAlgorithm << "\"" << std::endl;
438  gridAlg = std::auto_ptr<GridAlg>(
439  factory[recombinationAlgorithm]->create(
440  jetMembershipFunction.get(),
441  bgMembershipFunction.get(),
443  isCrisp, false, assignConstituents, minBin, maxBin));
444 }
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 476 of file FFTJetProducer.cc.

References convergenceDistance, i, and jetDistanceCalc.

Referenced by iterateJetReconstruction().

478 {
479  fftjet::Functor2<double,RecoFFTJet,RecoFFTJet>&
480  distanceCalc(*jetDistanceCalc);
481 
482  const unsigned nJets = previous.size();
483  if (nJets != nextSet.size())
484  return false;
485 
486  const RecoFFTJet* prev = &previous[0];
487  RecoFFTJet* next = &nextSet[0];
488 
489  // Calculate convergence distances for all jets
490  bool converged = true;
491  for (unsigned i=0; i<nJets; ++i)
492  {
493  const double d = distanceCalc(prev[i], next[i]);
494  next[i].setConvergenceDistance(d);
495  if (i < nJetsRequiredToConverge && d > convergenceDistance)
496  converged = false;
497  }
498 
499  return converged;
500 }
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 580 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().

581 {
582  const unsigned nJets = recoJets.size();
583  const unsigned* clusterMask = gridAlg->getClusterMask();
584  const int nEta = gridAlg->getLastNEta();
585  const int nPhi = gridAlg->getLastNPhi();
586  const fftjet::Grid2d<Real>& g(*energyFlow);
587 
588  const unsigned nInputs = eventData.size();
589  const VectorLike* inp = nInputs ? &eventData[0] : 0;
590  const unsigned* candIdx = nInputs ? &candidateIndex[0] : 0;
591  for (unsigned i=0; i<nInputs; ++i)
592  {
593  const VectorLike& item(inp[i]);
594  const int iPhi = g.getPhiBin(item.Phi());
595  const int iEta = g.getEtaBin(item.Eta());
596  const unsigned mask = iEta >= 0 && iEta < nEta ?
597  clusterMask[iEta*nPhi + iPhi] : 0;
598  assert(mask <= nJets);
599  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
600  }
601 }
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 1196 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, recoScaleRatioCalcJet, and zero.

Referenced by produce().

1197 {
1198  // This function works with crisp clustering only
1199  if (!isCrisp)
1200  assert(!"Pile-up subtraction for fuzzy clustering "
1201  "is not implemented yet");
1202 
1203  // Clear the pileup vector
1204  const unsigned nJets = recoJets.size();
1205  pileup.resize(nJets);
1206  if (nJets == 0)
1207  return;
1208  const VectorLike zero;
1209  for (unsigned i=0; i<nJets; ++i)
1210  pileup[i] = zero;
1211 
1212  // Pileup energy flow grid
1213  const fftjet::Grid2d<Real>& g(*pileupEnergyFlow);
1214  const unsigned nEta = g.nEta();
1215  const unsigned nPhi = g.nPhi();
1216  const double cellArea = g.etaBinWidth() * g.phiBinWidth();
1217 
1218  // Various calculators
1219  fftjet::Functor1<double,RecoFFTJet>& scaleCalc(*recoScaleCalcJet);
1220  fftjet::Functor1<double,RecoFFTJet>& ratioCalc(*recoScaleRatioCalcJet);
1221  fftjet::Functor1<double,RecoFFTJet>& factorCalc(*memberFactorCalcJet);
1222 
1223  // Make sure we have enough memory
1224  memFcns2dVec.resize(nJets);
1225  fftjet::AbsKernel2d** memFcns2d = &memFcns2dVec[0];
1226 
1227  doubleBuf.resize(nJets*4U + nJets*nPhi);
1228  double* recoScales = &doubleBuf[0];
1229  double* recoScaleRatios = recoScales + nJets;
1230  double* memFactors = recoScaleRatios + nJets;
1231  double* dEta = memFactors + nJets;
1232  double* dPhiBuf = dEta + nJets;
1233 
1234  cellCountsVec.resize(nJets);
1235  unsigned* cellCounts = &cellCountsVec[0];
1236 
1237  // Go over jets and collect the necessary info
1238  for (unsigned ijet=0; ijet<nJets; ++ijet)
1239  {
1240  const RecoFFTJet& jet(recoJets[ijet]);
1241  const fftjet::Peak& peak(jet.precluster());
1242 
1243  // Make sure we are using 2-d membership functions.
1244  // Pile-up subtraction scheme for 3-d functions should be different.
1245  fftjet::AbsMembershipFunction* m3d =
1246  dynamic_cast<fftjet::AbsMembershipFunction*>(
1247  peak.membershipFunction());
1248  if (m3d == 0)
1249  m3d = dynamic_cast<fftjet::AbsMembershipFunction*>(
1250  jetMembershipFunction.get());
1251  if (m3d)
1252  {
1253  assert(!"Pile-up subtraction for 3-d membership functions "
1254  "is not implemented yet");
1255  }
1256  else
1257  {
1258  fftjet::AbsKernel2d* m2d =
1259  dynamic_cast<fftjet::AbsKernel2d*>(
1260  peak.membershipFunction());
1261  if (m2d == 0)
1262  m2d = dynamic_cast<fftjet::AbsKernel2d*>(
1263  jetMembershipFunction.get());
1264  assert(m2d);
1265  memFcns2d[ijet] = m2d;
1266  }
1267  recoScales[ijet] = scaleCalc(jet);
1268  recoScaleRatios[ijet] = ratioCalc(jet);
1269  memFactors[ijet] = factorCalc(jet);
1270  cellCounts[ijet] = 0U;
1271 
1272  const double jetPhi = jet.vec().Phi();
1273  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1274  {
1275  double dphi = g.phiBinCenter(iphi) - jetPhi;
1276  while (dphi > M_PI)
1277  dphi -= (2.0*M_PI);
1278  while (dphi < -M_PI)
1279  dphi += (2.0*M_PI);
1280  dPhiBuf[iphi*nJets+ijet] = dphi;
1281  }
1282  }
1283 
1284  // Go over all grid points and integrate
1285  // the pile-up energy density
1286  VBuilder vMaker;
1287  for (unsigned ieta=0; ieta<nEta; ++ieta)
1288  {
1289  const double eta(g.etaBinCenter(ieta));
1290  const Real* databuf = g.data() + ieta*nPhi;
1291 
1292  // Figure out dEta for each jet
1293  for (unsigned ijet=0; ijet<nJets; ++ijet)
1294  dEta[ijet] = eta - recoJets[ijet].vec().Eta();
1295 
1296  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1297  {
1298  double maxW(0.0);
1299  unsigned maxWJet(nJets);
1300  const double* dPhi = dPhiBuf + iphi*nJets;
1301 
1302  for (unsigned ijet=0; ijet<nJets; ++ijet)
1303  {
1304  if (recoScaleRatios[ijet] > 0.0)
1305  memFcns2d[ijet]->setScaleRatio(recoScaleRatios[ijet]);
1306  const double f = memFactors[ijet]*
1307  (*memFcns2d[ijet])(dEta[ijet], dPhi[ijet],
1308  recoScales[ijet]);
1309  if (f > maxW)
1310  {
1311  maxW = f;
1312  maxWJet = ijet;
1313  }
1314  }
1315 
1316  if (maxWJet < nJets)
1317  {
1318  pileup[maxWJet] += vMaker(cellArea*databuf[iphi],
1319  eta, g.phiBinCenter(iphi));
1320  cellCounts[maxWJet]++;
1321  }
1322  }
1323  }
1324 }
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 1109 of file FFTJetProducer.cc.

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

Referenced by produce().

1112 {
1114  iEvent.getByLabel(label, summary);
1115 
1116  const reco::FFTJetPileupSummary& s(*summary);
1117  const AbsPileupCalculator& calc(*pileupDensityCalc);
1118  const bool phiDependent = calc.isPhiDependent();
1119 
1120  fftjet::Grid2d<Real>& g(*density);
1121  const unsigned nEta = g.nEta();
1122  const unsigned nPhi = g.nPhi();
1123 
1124  for (unsigned ieta=0; ieta<nEta; ++ieta)
1125  {
1126  const double eta(g.etaBinCenter(ieta));
1127 
1128  if (phiDependent)
1129  {
1130  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1131  {
1132  const double phi(g.phiBinCenter(iphi));
1133  g.uncheckedSetBin(ieta, iphi, calc(eta, phi, s));
1134  }
1135  }
1136  else
1137  {
1138  const double pil = calc(eta, 0.0, s);
1139  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1140  g.uncheckedSetBin(ieta, iphi, pil);
1141  }
1142  }
1143 }
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:361
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 1146 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().

1150 {
1153  iSetup, pileupTableRecord, h);
1154  boost::shared_ptr<npstat::StorableMultivariateFunctor> f =
1156 
1158  iEvent.getByLabel(label, summary);
1159 
1160  const float rho = summary->pileupRho();
1161  const bool phiDependent = f->minDim() == 3U;
1162 
1163  fftjet::Grid2d<Real>& g(*density);
1164  const unsigned nEta = g.nEta();
1165  const unsigned nPhi = g.nPhi();
1166 
1167  double functorArg[3] = {0.0, 0.0, 0.0};
1168  if (phiDependent)
1169  functorArg[2] = rho;
1170  else
1171  functorArg[1] = rho;
1172 
1173  for (unsigned ieta=0; ieta<nEta; ++ieta)
1174  {
1175  const double eta(g.etaBinCenter(ieta));
1176  functorArg[0] = eta;
1177 
1178  if (phiDependent)
1179  {
1180  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1181  {
1182  functorArg[1] = g.phiBinCenter(iphi);
1183  g.uncheckedSetBin(ieta, iphi, (*f)(functorArg, 3U));
1184  }
1185  }
1186  else
1187  {
1188  const double pil = (*f)(functorArg, 2U);
1189  for (unsigned iphi=0; iphi<nPhi; ++iphi)
1190  g.uncheckedSetBin(ieta, iphi, pil);
1191  }
1192  }
1193 }
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:361
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 604 of file FFTJetProducer.cc.

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

Referenced by produce().

605 {
606  const unsigned nJets = recoJets.size();
607  const unsigned* clusterMask = recoAlg->getClusterMask();
608  const unsigned maskLength = recoAlg->getLastNData();
609  assert(maskLength == eventData.size());
610 
611  const unsigned* candIdx = maskLength ? &candidateIndex[0] : 0;
612  for (unsigned i=0; i<maskLength; ++i)
613  {
614  // In FFTJet, the mask value of 0 corresponds to unclustered
615  // energy. We will do the same here. Jet numbers are therefore
616  // shifted by 1 wrt constituents vector, and constituents[1]
617  // corresponds to jet number 0.
618  const unsigned mask = clusterMask[i];
619  assert(mask <= nJets);
620  constituents[mask].push_back(inputCollection->ptrAt(candIdx[i]));
621  }
622 }
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 1328 of file FFTJetProducer.cc.

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

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

Referenced by produce().

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

Definition at line 503 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().

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

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

Referenced by produce().

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

Definition at line 217 of file FFTJetProducer.cc.

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

218 {
220 
221  // Get the input
223  iEvent.getByLabel(treeLabel, input);
224 
225  if (!input->isSparse())
226  throw cms::Exception("FFTJetBadConfig")
227  << "The stored clustering tree is not sparse" << std::endl;
228 
231  sparseTree.sortNodes();
232 }
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:19
std::auto_ptr< std::vector< double > > iniScales
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
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 133 of file FFTJetProducer.cc.

References GlobalPosition_Frontier_DevDB_cff::tag.

Referenced by FFTJetProducer().

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

Definition at line 900 of file FFTJetProducer.cc.

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

Referenced by beginJob().

901 {
903  ps.getParameter<edm::ParameterSet>("bgMembershipFunction"));
904 }
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 969 of file FFTJetProducer.cc.

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

Referenced by beginJob().

970 {
972  ps.getParameter<edm::ParameterSet>("jetDistanceCalc"));
973 }
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 891 of file FFTJetProducer.cc.

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

Referenced by beginJob().

892 {
894  ps.getParameter<edm::ParameterSet>("jetMembershipFunction"));
895 }
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 960 of file FFTJetProducer.cc.

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

Referenced by beginJob().

961 {
963  ps.getParameter<edm::ParameterSet>("memberFactorCalcJet"));
964 }
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 936 of file FFTJetProducer.cc.

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

Referenced by beginJob().

937 {
939  ps.getParameter<edm::ParameterSet>("memberFactorCalcPeak"));
940 }
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 882 of file FFTJetProducer.cc.

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

Referenced by beginJob().

883 {
885  ps.getParameter<edm::ParameterSet>("PeakSelectorConfiguration"));
886 }
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 918 of file FFTJetProducer.cc.

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

Referenced by beginJob().

919 {
921  ps.getParameter<edm::ParameterSet>("pileupDensityCalc"));
922 }
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 944 of file FFTJetProducer.cc.

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

Referenced by beginJob().

945 {
947  ps.getParameter<edm::ParameterSet>("recoScaleCalcJet"));
948 }
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 909 of file FFTJetProducer.cc.

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

Referenced by beginJob().

910 {
912  ps.getParameter<edm::ParameterSet>("recoScaleCalcPeak"));
913 }
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 952 of file FFTJetProducer.cc.

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

Referenced by beginJob().

953 {
955  ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcJet"));
956 }
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 927 of file FFTJetProducer.cc.

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

Referenced by beginJob().

928 {
930  ps.getParameter<edm::ParameterSet>("recoScaleRatioCalcPeak"));
931 }
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 112 of file FFTJetProducer.cc.

References edm::hlt::Exception.

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

Definition at line 400 of file FFTJetProducer.cc.

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

Referenced by produce().

401 {
402  const unsigned nClus = preclusters.size();
403  if (nClus)
404  {
405  fftjet::Peak* clus = &preclusters[0];
406  fftjet::Functor1<double,fftjet::Peak>&
407  scaleCalc(*recoScaleCalcPeak);
408  fftjet::Functor1<double,fftjet::Peak>&
409  ratioCalc(*recoScaleRatioCalcPeak);
410  fftjet::Functor1<double,fftjet::Peak>&
411  factorCalc(*memberFactorCalcPeak);
412 
413  for (unsigned i=0; i<nClus; ++i)
414  {
415  clus[i].setRecoScale(scaleCalc(clus[i]));
416  clus[i].setRecoScaleRatio(ratioCalc(clus[i]));
417  clus[i].setMembershipFactor(factorCalc(clus[i]));
418  }
419  }
420 }
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 760 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.

762 {
763  // Load the clustering tree made by FFTJetPatRecoProducer
765  loadSparseTreeData<float>(iEvent);
766  else
767  loadSparseTreeData<double>(iEvent);
768 
769  // Do we need to load the candidate collection?
771  loadInputCollection(iEvent);
772 
773  // Do we need to have discretized energy flow?
775  {
776  if (reuseExistingGrid)
777  {
778  if (loadEnergyFlow(iEvent, treeLabel, energyFlow))
779  buildGridAlg();
780  }
781  else
783  }
784 
785  // Calculate cluster occupancy as a function of level number
786  sparseTree.occupancyInScaleSpace(*peakSelector, &occupancy);
787 
788  // Select the preclusters using the requested resolution scheme
789  preclusters.clear();
790  if (resolution == FROM_GENJETS)
791  genJetPreclusters(sparseTree, iEvent, iSetup,
793  else
795  if (preclusters.size() > maxInitialPreclusters)
796  {
797  std::sort(preclusters.begin(), preclusters.end(), std::greater<fftjet::Peak>());
799  }
800 
801  // Prepare to run the jet recombination procedure
803 
804  // Assign membership functions to preclusters. If this function
805  // is not overriden in a derived class, default algorithm membership
806  // function will be used for every cluster.
808 
809  // Count the preclusters going in
810  unsigned nPreclustersFound = 0U;
811  const unsigned npre = preclusters.size();
812  for (unsigned i=0; i<npre; ++i)
813  if (preclusters[i].membershipFactor() > 0.0)
814  ++nPreclustersFound;
815 
816  // Run the recombination algorithm once
817  int status = 0;
819  status = gridAlg->run(preclusters, *energyFlow,
820  &noiseLevel, 1U, 1U,
822  else
823  status = recoAlg->run(preclusters, eventData, &noiseLevel, 1U,
825  if (status)
826  throw cms::Exception("FFTJetInterface")
827  << "FFTJet algorithm failed (first iteration)" << std::endl;
828 
829  // If requested, iterate the jet recombination procedure
830  if (maxIterations > 1U && !recoJets.empty())
831  {
832  // It is possible to have a smaller number of jets than we had
833  // preclusters. Fake preclusters are possible, but for a good
834  // choice of pattern recognition kernel their presence should
835  // be infrequent. However, any fake preclusters will throw the
836  // iterative reconstruction off balance. Deal with the problem now.
837  const unsigned nJets = recoJets.size();
838  if (preclusters.size() != nJets)
839  {
840  assert(nJets < preclusters.size());
842  }
844  }
845  else
846  iterationsPerformed = 1U;
847 
848  // Determine jet constituents. FFTJet returns a map
849  // of constituents which is inverse to what we need here.
850  const unsigned nJets = recoJets.size();
851  if (constituents.size() <= nJets)
852  constituents.resize(nJets + 1U);
853  if (assignConstituents)
854  {
855  for (unsigned i=0; i<=nJets; ++i)
856  constituents[i].clear();
859  else
861  }
862 
863  // Figure out the pile-up
864  if (calculatePileup)
865  {
866  if (loadPileupFromDB)
867  determinePileupDensityFromDB(iEvent, iSetup,
869  else
872  determinePileup();
873  assert(pileup.size() == recoJets.size());
874  }
875 
876  // Write out the results
877  saveResults(iEvent, iSetup, nPreclustersFound);
878 }
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:168
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 1071 of file FFTJetProducer.cc.

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

Referenced by iterateJetReconstruction(), and produce().

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

726 {
727  // Write recombined jets
728  jet_type_switch(writeJets, ev, iSetup);
729 
730  // Check if we should resum unclustered energy constituents
731  VectorLike unclusE(unclustered);
732  if (resumConstituents)
733  {
734  VectorLike sum(0.0, 0.0, 0.0, 0.0);
735  const unsigned nCon = constituents[0].size();
736  const reco::CandidatePtr* cn = nCon ? &constituents[0][0] : 0;
737  for (unsigned i=0; i<nCon; ++i)
738  sum += cn[i]->p4();
739  unclusE = sum;
740  }
741 
742  // Write the jet reconstruction summary
743  const double minScale = minLevel ? sparseTree.getScale(minLevel) : 0.0;
744  const double maxScale = maxLevel ? sparseTree.getScale(maxLevel) : 0.0;
745  const double scaleUsed = usedLevel ? sparseTree.getScale(usedLevel) : 0.0;
746 
747  std::auto_ptr<reco::FFTJetProducerSummary> summary(
749  thresholds, occupancy, unclusE,
750  constituents[0], unused,
751  minScale, maxScale, scaleUsed,
752  nPreclustersFound, iterationsPerformed,
753  iterationsPerformed == 1U ||
755  ev.put(summary, outputLabel);
756 }
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 263 of file FFTJetProducer.cc.

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

Referenced by produce().

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

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

References ntuplemaker::status.

Referenced by writeJets().

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

Definition at line 628 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, edm::Event::put(), L1Trigger_dataformats::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().

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

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

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

Definition at line 338 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const bool FFTJetProducer::calculatePileup
private

Definition at line 271 of file FFTJetProducer.h.

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

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

Definition at line 405 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 259 of file FFTJetProducer.h.

Referenced by checkConvergence().

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

Definition at line 404 of file FFTJetProducer.h.

Referenced by determinePileup().

const double FFTJetProducer::fixedScale
private

Definition at line 280 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::InputTag FFTJetProducer::genJetsLabel
private

Definition at line 306 of file FFTJetProducer.h.

Referenced by genJetPreclusters().

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

Definition at line 297 of file FFTJetProducer.h.

Referenced by buildGridAlg().

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

Definition at line 326 of file FFTJetProducer.h.

Referenced by FFTJetProducer(), and loadSparseTreeData().

const bool FFTJetProducer::isCrisp
private

Definition at line 301 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::iterationsPerformed
private

Definition at line 385 of file FFTJetProducer.h.

Referenced by produce(), and saveResults().

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

Definition at line 384 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction().

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

Definition at line 383 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and removeFakePreclusters().

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

Definition at line 358 of file FFTJetProducer.h.

Referenced by beginJob(), and checkConvergence().

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

Definition at line 337 of file FFTJetProducer.h.

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

bool FFTJetProducer::loadPileupFromDB
private

Definition at line 323 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

const unsigned FFTJetProducer::maxInitialPreclusters
private

Definition at line 311 of file FFTJetProducer.h.

Referenced by produce().

const unsigned FFTJetProducer::maxIterations
private

Definition at line 255 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::maxLevel
private

Definition at line 376 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::maxStableScale
private

Definition at line 284 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

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

Definition at line 353 of file FFTJetProducer.h.

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

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

Definition at line 348 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

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

Definition at line 403 of file FFTJetProducer.h.

Referenced by determinePileup().

unsigned FFTJetProducer::minLevel
private

Definition at line 376 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const double FFTJetProducer::minStableScale
private

Definition at line 283 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const edm::ParameterSet FFTJetProducer::myConfiguration
private

Definition at line 241 of file FFTJetProducer.h.

Referenced by beginJob().

const unsigned FFTJetProducer::nClustersRequested
private

Definition at line 294 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const unsigned FFTJetProducer::nJetsRequiredToConverge
private

Definition at line 258 of file FFTJetProducer.h.

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

Definition at line 361 of file FFTJetProducer.h.

Referenced by selectPreclusters().

const double FFTJetProducer::noiseLevel
private

Definition at line 291 of file FFTJetProducer.h.

Referenced by iterateJetReconstruction(), and produce().

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

Definition at line 370 of file FFTJetProducer.h.

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

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

Definition at line 332 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

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

Definition at line 392 of file FFTJetProducer.h.

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

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

Definition at line 400 of file FFTJetProducer.h.

Referenced by beginJob(), and determinePileupDensityFromConfig().

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

Definition at line 397 of file FFTJetProducer.h.

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

const edm::InputTag FFTJetProducer::pileupLabel
private

Definition at line 277 of file FFTJetProducer.h.

Referenced by produce().

std::string FFTJetProducer::pileupTableCategory
private

Definition at line 322 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableName
private

Definition at line 321 of file FFTJetProducer.h.

Referenced by determinePileupDensityFromDB().

std::string FFTJetProducer::pileupTableRecord
private

Definition at line 320 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 300 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

const double FFTJetProducer::recombinationDataCutoff
private

Definition at line 303 of file FFTJetProducer.h.

Referenced by buildGridAlg(), and writeJets().

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

Definition at line 351 of file FFTJetProducer.h.

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

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

Definition at line 341 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

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

Definition at line 352 of file FFTJetProducer.h.

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

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

Definition at line 345 of file FFTJetProducer.h.

Referenced by beginJob(), and prepareRecombinationScales().

Resolution FFTJetProducer::resolution
private

Definition at line 316 of file FFTJetProducer.h.

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

const bool FFTJetProducer::resumConstituents
private

Definition at line 267 of file FFTJetProducer.h.

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

const bool FFTJetProducer::reuseExistingGrid
private

Definition at line 252 of file FFTJetProducer.h.

Referenced by beginJob(), and produce().

SparseTree FFTJetProducer::sparseTree
private

Definition at line 329 of file FFTJetProducer.h.

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

const double FFTJetProducer::stabilityAlpha
private

Definition at line 287 of file FFTJetProducer.h.

Referenced by selectTreeNodes().

const bool FFTJetProducer::subtractPileup
private

Definition at line 272 of file FFTJetProducer.h.

Referenced by writeJets().

const bool FFTJetProducer::subtractPileupAs4Vec
private

Definition at line 273 of file FFTJetProducer.h.

Referenced by writeJets().

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

Definition at line 373 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const edm::InputTag FFTJetProducer::treeLabel
private

Definition at line 244 of file FFTJetProducer.h.

Referenced by loadSparseTreeData(), and produce().

fftjetcms::VectorLike FFTJetProducer::unclustered
private

Definition at line 379 of file FFTJetProducer.h.

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

const double FFTJetProducer::unlikelyBgWeight
private

Definition at line 302 of file FFTJetProducer.h.

Referenced by beginJob(), and buildGridAlg().

double FFTJetProducer::unused
private

Definition at line 380 of file FFTJetProducer.h.

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

unsigned FFTJetProducer::usedLevel
private

Definition at line 376 of file FFTJetProducer.h.

Referenced by saveResults(), and selectTreeNodes().

const bool FFTJetProducer::useGriddedAlgorithm
private

Definition at line 248 of file FFTJetProducer.h.

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