ClusterSequence1GhostPassiveArea.cc
Go to the documentation of this file.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/ClusterSequence1GhostPassiveArea.hh"
00032
00033 FASTJET_BEGIN_NAMESPACE
00034
00035
00036 using namespace std;
00037
00038
00040 void ClusterSequence1GhostPassiveArea::_initialise_and_run_1GPA (
00041 const JetDefinition & jet_def,
00042 const GhostedAreaSpec & area_spec,
00043 const bool & writeout_combinations) {
00044
00045 bool continue_running;
00046 _initialise_AA(jet_def, area_spec, writeout_combinations, continue_running);
00047 if (continue_running) {
00048 _run_1GPA(area_spec);
00049 _postprocess_AA(area_spec);
00050 }
00051 }
00052
00053
00054
00056 void ClusterSequence1GhostPassiveArea::_run_1GPA (const GhostedAreaSpec & area_spec) {
00057
00058 vector<PseudoJet> input_jets(_jets);
00059
00060
00061 vector<int> unique_tree;
00062
00063
00064 valarray<double> lcl_average_area2(0.0, _average_area.size());
00065 valarray<double> last_average_area(0.0, _average_area.size());
00066
00067
00068 for (int irepeat = 0; irepeat < area_spec.repeat(); irepeat++) {
00069
00070
00071 vector<PseudoJet> all_ghosts;
00072 area_spec.add_ghosts(all_ghosts);
00073
00074
00075 for (unsigned ig = 0; ig < all_ghosts.size(); ig++) {
00076 vector<PseudoJet> some_ghosts;
00077 some_ghosts.push_back(all_ghosts[ig]);
00078 ClusterSequenceActiveAreaExplicitGhosts clust_seq(input_jets, jet_def(),
00079 some_ghosts, area_spec.actual_ghost_area());
00080
00081 if (irepeat == 0 && ig == 0) {
00082
00083
00084 _transfer_ghost_free_history(clust_seq);
00085
00086 unique_tree = unique_history_order();
00087 }
00088
00089
00090 _transfer_areas(unique_tree, clust_seq);
00091 }
00092
00093 lcl_average_area2 += (_average_area - last_average_area)*
00094 (_average_area - last_average_area);
00095 last_average_area = _average_area;
00096 }
00097 _average_area2 = lcl_average_area2;
00098 }
00099
00100
00101 FASTJET_END_NAMESPACE
00102