31 #ifndef __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ 32 #define __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ 34 #include "fastjet/PseudoJet.hh" 35 #include "fastjet/ClusterSequenceAreaBase.hh" 36 #include "fastjet/GhostedAreaSpec.hh" 37 #include "fastjet/LimitedWarning.hh" 42 FASTJET_BEGIN_NAMESPACE
63 (
const std::vector<L> & pseudojets,
66 const bool & writeout_combinations =
false)
68 std::vector<L> * ghosts = NULL;
69 _initialise(pseudojets,jet_def_in,&ghost_spec,ghosts,0.0,
70 writeout_combinations); }
73 (
const std::vector<L> & pseudojets,
75 const std::vector<L> & ghosts,
77 const bool & writeout_combinations =
false)
80 _initialise(pseudojets,jet_def_in,ghost_spec,&ghosts,ghost_area,
81 writeout_combinations); }
85 template<
class L>
void _initialise
86 (
const std::vector<L> & pseudojets,
89 const std::vector<L> * ghosts,
91 const bool & writeout_combinations);
96 unsigned int n_hard_particles()
const;
99 virtual double area (
const PseudoJet & jet)
const FASTJET_OVERRIDE;
108 virtual bool is_pure_ghost(
const PseudoJet & jet)
const FASTJET_OVERRIDE;
113 bool is_pure_ghost(
int history_index)
const;
122 virtual double empty_area(
const Selector & selector)
const FASTJET_OVERRIDE;
125 double total_area ()
const;
143 std::vector<bool> _is_pure_ghost;
144 std::vector<double> _areas;
145 std::vector<PseudoJet> _area_4vectors;
148 double _max_ghost_perp2;
149 bool _has_dangerous_particles;
156 unsigned int _initial_hard_n;
163 template<
class L>
void _add_ghosts (
164 const std::vector<L> & ghosts,
170 void _post_process();
178 template<
class L>
void ClusterSequenceActiveAreaExplicitGhosts::_initialise
179 (
const std::vector<L> & pseudojets,
182 const std::vector<L> * ghosts,
184 const bool & writeout_combinations) {
191 for (
unsigned int i = 0; i < pseudojets.size(); i++) {
194 _jets.push_back(mom);
195 _is_pure_ghost.push_back(
false);
198 _initial_hard_n = _jets.size();
200 if (ghost_spec != NULL) {
202 _jets.reserve((_jets.size()+ghost_spec->n_ghosts()));
203 _add_ghosts(*ghost_spec);
205 _jets.reserve(_jets.size()+ghosts->size());
206 _add_ghosts(*ghosts, ghost_area);
209 if (writeout_combinations) {
210 std::cout <<
"# Printing particles including ghosts\n";
211 for (
unsigned j = 0; j < _jets.size(); j++) {
212 printf(
"%5u %20.13f %20.13f %20.13e\n",
213 j,_jets[j].rap(),_jets[j].phi_02pi(),_jets[j].kt2());
215 std::cout <<
"# Finished printing particles including ghosts\n";
221 _jets.reserve(_jets.size()*2);
224 _initialise_and_run(jet_def_in,writeout_combinations);
231 inline unsigned int ClusterSequenceActiveAreaExplicitGhosts::n_hard_particles()
const {
return _initial_hard_n;}
236 template<
class L>
void ClusterSequenceActiveAreaExplicitGhosts::_add_ghosts (
237 const std::vector<L> & ghosts,
241 for (
unsigned i = 0; i < ghosts.size(); i++) {
242 _is_pure_ghost.push_back(
true);
243 _jets.push_back(ghosts[i]);
246 _ghost_area = ghost_area;
247 _n_ghosts = ghosts.size();
251 FASTJET_END_NAMESPACE
253 #endif // __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ double max_ghost_perp2() const
returns the largest squared transverse momentum among all ghosts
virtual bool has_explicit_ghosts() const override
this class does have explicit ghosts
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
base class that sets interface for extensions of ClusterSequence that provide information about the a...
Like ClusterSequence with computation of the active jet area with the addition of explicit ghosts...
bool has_dangerous_particles() const
returns true if there are any particles whose transverse momentum if so low that there's a risk of th...
Class that encodes information about cuts and other selection criteria that can be applied to PseudoJ...
Parameters to configure the computation of jet areas using ghosts.
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
class that is intended to hold a full definition of the jet clusterer