29 #ifndef __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ 30 #define __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ 32 #include "fastjet/PseudoJet.hh" 33 #include "fastjet/ClusterSequenceAreaBase.hh" 34 #include "fastjet/GhostedAreaSpec.hh" 35 #include "fastjet/LimitedWarning.hh" 40 FASTJET_BEGIN_NAMESPACE
61 (
const std::vector<L> & pseudojets,
64 const bool & writeout_combinations =
false)
66 std::vector<L> * ghosts = NULL;
67 _initialise(pseudojets,jet_def_in,&ghost_spec,ghosts,0.0,
68 writeout_combinations); }
71 (
const std::vector<L> & pseudojets,
73 const std::vector<L> & ghosts,
75 const bool & writeout_combinations =
false)
78 _initialise(pseudojets,jet_def_in,ghost_spec,&ghosts,ghost_area,
79 writeout_combinations); }
83 template<
class L>
void _initialise
84 (
const std::vector<L> & pseudojets,
87 const std::vector<L> * ghosts,
89 const bool & writeout_combinations);
94 unsigned int n_hard_particles()
const;
97 virtual double area (
const PseudoJet & jet)
const;
106 virtual bool is_pure_ghost(
const PseudoJet & jet)
const;
111 bool is_pure_ghost(
int history_index)
const;
120 virtual double empty_area(
const Selector & selector)
const;
123 double total_area ()
const;
141 std::vector<bool> _is_pure_ghost;
142 std::vector<double> _areas;
143 std::vector<PseudoJet> _area_4vectors;
146 double _max_ghost_perp2;
147 bool _has_dangerous_particles;
154 unsigned int _initial_hard_n;
161 template<
class L>
void _add_ghosts (
162 const std::vector<L> & ghosts,
168 void _post_process();
176 template<
class L>
void ClusterSequenceActiveAreaExplicitGhosts::_initialise
177 (
const std::vector<L> & pseudojets,
180 const std::vector<L> * ghosts,
182 const bool & writeout_combinations) {
189 for (
unsigned int i = 0; i < pseudojets.size(); i++) {
192 _jets.push_back(mom);
193 _is_pure_ghost.push_back(
false);
196 _initial_hard_n = _jets.size();
198 if (ghost_spec != NULL) {
200 _jets.reserve((_jets.size()+ghost_spec->n_ghosts()));
201 _add_ghosts(*ghost_spec);
203 _jets.reserve(_jets.size()+ghosts->size());
204 _add_ghosts(*ghosts, ghost_area);
207 if (writeout_combinations) {
208 std::cout <<
"# Printing particles including ghosts\n";
209 for (
unsigned j = 0; j < _jets.size(); j++) {
210 printf(
"%5u %20.13f %20.13f %20.13e\n",
211 j,_jets[j].rap(),_jets[j].phi_02pi(),_jets[j].kt2());
213 std::cout <<
"# Finished printing particles including ghosts\n";
219 _jets.reserve(_jets.size()*2);
222 _initialise_and_run(jet_def_in,writeout_combinations);
229 inline unsigned int ClusterSequenceActiveAreaExplicitGhosts::n_hard_particles()
const {
return _initial_hard_n;}
234 template<
class L>
void ClusterSequenceActiveAreaExplicitGhosts::_add_ghosts (
235 const std::vector<L> & ghosts,
239 for (
unsigned i = 0; i < ghosts.size(); i++) {
240 _is_pure_ghost.push_back(
true);
241 _jets.push_back(ghosts[i]);
244 _ghost_area = ghost_area;
245 _n_ghosts = ghosts.size();
249 FASTJET_END_NAMESPACE
251 #endif // __FASTJET_CLUSTERSEQUENCEACTIVEAREAEXPLICITGHOSTS_HH_ virtual bool has_explicit_ghosts() const
this class does have explicit ghosts
class to provide facilities for giving warnings up to some maximum number of times and to provide glo...
double max_ghost_perp2() const
returns the largest squared transverse momentum among all ghosts
base class that sets interface for extensions of ClusterSequence that provide information about the a...
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...
Like ClusterSequence with computation of the active jet area with the addition of explicit ghosts...
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