1 #ifndef __FASTJET_BACKGROUND_ESTIMATOR_HH__
2 #define __FASTJET_BACKGROUND_ESTIMATOR_HH__
32 #include <fastjet/ClusterSequenceAreaBase.hh>
33 #include <fastjet/AreaDefinition.hh>
34 #include <fastjet/FunctionOfPseudoJet.hh>
35 #include <fastjet/Selector.hh>
36 #include <fastjet/tools/BackgroundEstimatorBase.hh>
39 FASTJET_BEGIN_NAMESPACE
123 : _rho_range(rho_range), _jet_def(
JetDefinition()) { reset(); }
138 virtual void set_particles(
const std::vector<PseudoJet> & particles);
162 void set_jets(
const std::vector<PseudoJet> &jets);
166 _rho_range = rho_range_selector;
181 double sigma()
const;
211 _recompute_if_needed();
218 _recompute_if_needed();
236 _recompute_if_needed();
252 _recompute_if_needed();
253 return _n_empty_jets;
279 _use_area_4vector = use_it;
291 _provide_fj2_sigma = provide_fj2_sigma;
306 return _jet_density_class;
318 BackgroundEstimatorBase::set_rescaling_class(rescaling_class_in);
329 std::string description()
const;
337 void _compute()
const;
341 void _recompute_if_needed()
const {
342 if (!_uptodate) _compute();
353 void _recompute_if_needed(
const PseudoJet &jet);
357 void _check_csa_alive()
const;
362 void _check_jet_alg_good_for_median()
const;
366 JetDefinition _jet_def;
367 AreaDefinition _area_def;
368 std::vector<PseudoJet> _included_jets;
371 bool _use_area_4vector;
372 bool _provide_fj2_sigma;
373 const FunctionOfPseudoJet<double> * _jet_density_class;
378 mutable double _sigma;
379 mutable double _mean_area;
380 mutable unsigned int _n_jets_used;
381 mutable double _n_empty_jets;
382 mutable double _empty_area;
385 SharedPtr<PseudoJetStructureBase> _csi;
386 PseudoJet _current_reference;
387 mutable bool _uptodate;
390 static LimitedWarning _warnings;
391 static LimitedWarning _warnings_zero_area;
392 static LimitedWarning _warnings_preliminary;
408 virtual std::string description()
const {
return "BackgroundJetPtDensity";}
429 virtual double result(
const PseudoJet & jet)
const;
431 virtual std::string description()
const {
return "BackgroundScalarJetPtDensity";}
450 std::vector<PseudoJet> constituents = jet.
constituents();
451 double scalar_ptm = 0;
452 for (
unsigned i = 0; i < constituents.size(); i++) {
453 scalar_ptm += constituents[i].mperp() - constituents[i].perp();
455 return scalar_ptm / jet.
area();
458 virtual std::string description()
const {
return "BackgroundPtMDensity";}
463 FASTJET_END_NAMESPACE
465 #endif // __BACKGROUND_ESTIMATOR_HH__
virtual double area() const
return the jet (scalar) area.
virtual double result(const PseudoJet &jet) const
the action of the function this has to be overloaded in derived classes
virtual std::vector< PseudoJet > constituents() const
retrieve the constituents.
double perp() const
returns the scalar transverse momentum
virtual PseudoJet area_4vector() const
return the jet 4-vector area.
virtual double result(const PseudoJet &jet) const
the action of the function this has to be overloaded in derived classes
BackgroundJetScalarPtDensity()
Default constructor provides background estimation with scalar pt sum.
BackgroundJetScalarPtDensity(double n)
Constructor to provide background estimation based on .