fastjet 2.4.5
Public Member Functions | Private Member Functions
fastjet::ClusterSequencePassiveArea Class Reference

Class that behaves essentially like ClusterSequence except that it also provides access to the area of a jet (which will be a random quantity... More...

#include <ClusterSequencePassiveArea.hh>

Inheritance diagram for fastjet::ClusterSequencePassiveArea:
Inheritance graph
[legend]
Collaboration diagram for fastjet::ClusterSequencePassiveArea:
Collaboration graph
[legend]

List of all members.

Public Member Functions

template<class L >
 ClusterSequencePassiveArea (const std::vector< L > &pseudojets, const JetDefinition &jet_def, const GhostedAreaSpec &area_spec, const bool &writeout_combinations=false)
 constructor based on JetDefinition and PassiveAreaSpec
virtual double empty_area (const RangeDefinition &range) const
 return an empty area that's appropriate to the passive area determination carried out

Private Member Functions

void _initialise_and_run_PA (const JetDefinition &jet_def, const GhostedAreaSpec &area_spec, const bool &writeout_combinations=false)
 does the initialisation and running specific to the passive areas class

Detailed Description

Class that behaves essentially like ClusterSequence except that it also provides access to the area of a jet (which will be a random quantity...

Figure out what to do about seeds later...)

Definition at line 48 of file ClusterSequencePassiveArea.hh.


Constructor & Destructor Documentation

template<class L >
fastjet::ClusterSequencePassiveArea::ClusterSequencePassiveArea ( const std::vector< L > &  pseudojets,
const JetDefinition jet_def,
const GhostedAreaSpec area_spec,
const bool &  writeout_combinations = false 
)

constructor based on JetDefinition and PassiveAreaSpec

Definition at line 76 of file ClusterSequencePassiveArea.hh.

                                     {

  // transfer the initial jets (type L) into our own array
  _transfer_input_jets(pseudojets);

  // run the clustering for passive areas
  _initialise_and_run_PA(jet_def, area_spec, writeout_combinations);

}

Member Function Documentation

void fastjet::ClusterSequencePassiveArea::_initialise_and_run_PA ( const JetDefinition jet_def,
const GhostedAreaSpec area_spec,
const bool &  writeout_combinations = false 
) [private]

does the initialisation and running specific to the passive areas class

global routine for initialising and running a passive area that is correct in general, but that chooses an optimal approach for various special cases.

Definition at line 43 of file ClusterSequencePassiveArea.cc.

References fastjet::antikt_algorithm, fastjet::ClusterSequenceVoronoiArea::area(), fastjet::ClusterSequenceVoronoiArea::area_4vector(), fastjet::cambridge_algorithm, fastjet::cambridge_for_passive_algorithm, fastjet::JetDefinition::jet_algorithm(), fastjet::kt_algorithm, fastjet::GhostedAreaSpec::mean_ghost_kt(), fastjet::JetDefinition::plugin(), fastjet::plugin_algorithm, fastjet::JetDefinition::set_extra_param(), and fastjet::JetDefinition::set_jet_finder().

                                                    {

  if (jet_def.jet_algorithm() == kt_algorithm) {
    // first run the passive area
    ClusterSequenceVoronoiArea csva(_jets,jet_def,VoronoiAreaSpec(1.0));
    // now set up and transfer relevant information    
    // first the clustering sequence
    transfer_from_sequence(csva);
    // then the areas
    _resize_and_zero_AA();
    for (unsigned i = 0; i < _history.size(); i++) {
      int ijetp = _history[i].jetp_index;
      if (ijetp != Invalid) {
        _average_area[i] = csva.area(_jets[ijetp]);
        _average_area_4vector[i] = csva.area_4vector(_jets[ijetp]);
      }
    }

  } else if (jet_def.jet_algorithm() == cambridge_algorithm) {
    // run a variant of the cambridge algorithm that has been hacked
    // to deal with passive areas
    JetDefinition tmp_jet_def = jet_def;
    tmp_jet_def.set_jet_finder(cambridge_for_passive_algorithm);
    tmp_jet_def.set_extra_param(sqrt(area_spec.mean_ghost_kt()));
    _initialise_and_run_AA(tmp_jet_def, area_spec, writeout_combinations);
    _jet_def = jet_def;

  } else if (jet_def.jet_algorithm() == antikt_algorithm) {
    // for the antikt algorithm, passive and active are identical
    _initialise_and_run_AA(jet_def, area_spec, writeout_combinations);

  } else if (jet_def.jet_algorithm() == plugin_algorithm &&
             jet_def.plugin()->supports_ghosted_passive_areas()) {
    // for some plugin algorithms, one can "prime" the algorithm with information
    // about the ghost scale, and then an "AA" run will actually give a passive
    // area
    double ghost_sep_scale_store = jet_def.plugin()->ghost_separation_scale();
    jet_def.plugin()->set_ghost_separation_scale(sqrt(area_spec.mean_ghost_kt()));
    _initialise_and_run_AA(jet_def, area_spec, writeout_combinations);

    // restore the original ghost_sep_scale
    jet_def.plugin()->set_ghost_separation_scale(ghost_sep_scale_store);

  } else {
    // for a generic algorithm, just run the 1GhostPassiveArea
    _initialise_and_run_1GPA(jet_def, area_spec, writeout_combinations);
  }
}
double fastjet::ClusterSequencePassiveArea::empty_area ( const RangeDefinition range) const [virtual]

return an empty area that's appropriate to the passive area determination carried out

Reimplemented from fastjet::ClusterSequenceActiveArea.

Definition at line 97 of file ClusterSequencePassiveArea.cc.

References fastjet::kt_algorithm.

                                                                                  {
  if (jet_def().jet_algorithm() == kt_algorithm) {
    // run the naive algorithm
    return ClusterSequenceAreaBase::empty_area(range);
  } else {
    return ClusterSequence1GhostPassiveArea::empty_area(range);
  }
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines