00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "fastjet/ClusterSequencePassiveArea.hh"
00032 #include "fastjet/ClusterSequenceVoronoiArea.hh"
00033
00034 FASTJET_BEGIN_NAMESPACE
00035
00036
00037 using namespace std;
00038
00039
00043 void ClusterSequencePassiveArea::_initialise_and_run_PA (
00044 const JetDefinition & jet_def,
00045 const GhostedAreaSpec & area_spec,
00046 const bool & writeout_combinations) {
00047
00048 if (jet_def.jet_algorithm() == kt_algorithm) {
00049
00050 ClusterSequenceVoronoiArea csva(_jets,jet_def,VoronoiAreaSpec(1.0));
00051
00052
00053 transfer_from_sequence(csva);
00054
00055 _resize_and_zero_AA();
00056 for (unsigned i = 0; i < _history.size(); i++) {
00057 int ijetp = _history[i].jetp_index;
00058 if (ijetp != Invalid) {
00059 _average_area[i] = csva.area(_jets[ijetp]);
00060 _average_area_4vector[i] = csva.area_4vector(_jets[ijetp]);
00061 }
00062 }
00063
00064 } else if (jet_def.jet_algorithm() == cambridge_algorithm) {
00065
00066
00067 JetDefinition tmp_jet_def = jet_def;
00068 tmp_jet_def.set_jet_finder(cambridge_for_passive_algorithm);
00069 tmp_jet_def.set_extra_param(sqrt(area_spec.mean_ghost_kt()));
00070 _initialise_and_run_AA(tmp_jet_def, area_spec, writeout_combinations);
00071 _jet_def = jet_def;
00072
00073 } else if (jet_def.jet_algorithm() == antikt_algorithm) {
00074
00075 _initialise_and_run_AA(jet_def, area_spec, writeout_combinations);
00076
00077 } else if (jet_def.jet_algorithm() == plugin_algorithm &&
00078 jet_def.plugin()->supports_ghosted_passive_areas()) {
00079
00080
00081
00082 double ghost_sep_scale_store = jet_def.plugin()->ghost_separation_scale();
00083 jet_def.plugin()->set_ghost_separation_scale(sqrt(area_spec.mean_ghost_kt()));
00084 _initialise_and_run_AA(jet_def, area_spec, writeout_combinations);
00085
00086
00087 jet_def.plugin()->set_ghost_separation_scale(ghost_sep_scale_store);
00088
00089 } else {
00090
00091 _initialise_and_run_1GPA(jet_def, area_spec, writeout_combinations);
00092 }
00093 }
00094
00095
00096
00097 double ClusterSequencePassiveArea::empty_area (const RangeDefinition & range) const {
00098 if (jet_def().jet_algorithm() == kt_algorithm) {
00099
00100 return ClusterSequenceAreaBase::empty_area(range);
00101 } else {
00102 return ClusterSequence1GhostPassiveArea::empty_area(range);
00103 }
00104 }
00105
00106
00107 FASTJET_END_NAMESPACE
00108