00001 #include <list>
00002 #include "ILConeAlgorithm.hpp"
00003 #include "HepEntity.h"
00004
00005 #include <fastjet/internal/base.hh>
00006
00007 FASTJET_BEGIN_NAMESPACE
00008
00009 namespace d0{
00010
00011 using namespace std;
00012
00013 int main() {
00014
00015
00016 HepEntity el;
00017 list<const HepEntity*> *ensemble = new list<const HepEntity*>;
00018
00019
00020
00021 el.Fill(100., 25., 25., 25., 0);
00022 ensemble->push_back(new HepEntity(el));
00023 el.Fill(105., 20., 30., 30., 1);
00024 ensemble->push_back(new HepEntity(el));
00025 el.Fill(60., 20., 20., 20., 2);
00026 ensemble->push_back(new HepEntity(el));
00027 el.Fill(95., 65., 10., 20., 3);
00028 ensemble->push_back(new HepEntity(el));
00029
00030 el.Fill(110., 25., -25., -25., 4);
00031 ensemble->push_back(new HepEntity(el));
00032 el.Fill(100., 23., -25., -25., 5);
00033 ensemble->push_back(new HepEntity(el));
00034 el.Fill(101., 25., -20., -25., 6);
00035 ensemble->push_back(new HepEntity(el));
00036 el.Fill(102., 25., -25., -23., 7);
00037 ensemble->push_back(new HepEntity(el));
00038
00039
00040
00041 cout << "list->size()=" << ensemble->size() << endl;
00042 int i=1;
00043 for (list<const HepEntity*>::iterator it = ensemble->begin(); it != ensemble->end(); ++it) {
00044 cout << "4-vector " << i++ << " : E=" << (*it)->E << " pT=" << (*it)->pT() << " y=" << (*it)->y() << " phi=" << (*it)->phi() << endl;
00045 cout << (*it) << endl;
00046 }
00047
00048
00049 float cone_radius = 0.5;
00050 float min_jet_Et = 8.0;
00051 float split_ratio = 0.5;
00052
00053
00054
00055 float far_ratio=0.5;
00056 float Et_min_ratio=0.5;
00057 bool kill_duplicate=true;
00058 float duplicate_dR=0.005;
00059 float duplicate_dPT=0.01;
00060 float search_factor=1.0;
00061 float pT_min_leading_protojet=0.;
00062 float pT_min_second_protojet=0.;
00063 int merge_max=10000;
00064 float pT_min_nomerge=0.;
00065
00066 ILConeAlgorithm<HepEntity>
00067 ilegac(cone_radius, min_jet_Et, split_ratio,
00068 far_ratio, Et_min_ratio, kill_duplicate, duplicate_dR,
00069 duplicate_dPT, search_factor, pT_min_leading_protojet,
00070 pT_min_second_protojet, merge_max, pT_min_nomerge);
00071
00072 float Item_ET_Threshold = 0.;
00073 float Zvertex = 0.;
00074
00075 float* Item_ET_Threshold_ptr = &Item_ET_Threshold;
00076
00077
00078 list<HepEntity> jets;
00079 ilegac.makeClusters(jets, *ensemble, Item_ET_Threshold);
00080
00081
00082 list<HepEntity>::iterator it;
00083 cout << "Number of jets = " << jets.size() << endl;
00084 for (it=jets.begin(); it!=jets.end(); ++it) {
00085 cout << "jet: E=" << (*it).E << " pT=" << (*it).pT() << " y=" << (*it).y() << " phi=" << (*it).phi() << endl;
00086 }
00087
00088
00089
00090 for (list<const HepEntity*>::iterator it = ensemble->begin(); it != ensemble->end(); ++it) {
00091 delete *it;
00092 }
00093 delete ensemble;
00094
00095 return 0;
00096
00097 }
00098
00099 }
00100
00101
00102 FASTJET_END_NAMESPACE