#include <CDFJetCluPlugin.hh>
Inheritance diagram for fastjet::CDFJetCluPlugin:


Public Member Functions | |
| CDFJetCluPlugin (double cone_radius, double overlap_threshold=0.5, double seed_threshold=1.0) | |
| a compact constructor | |
| CDFJetCluPlugin (double seed_threshold, double cone_radius, int adjacency_cut, int max_iterations, int iratch, double overlap_threshold) | |
| a constructor that looks like the one provided by CDF | |
| double | seed_threshold () const |
| double | cone_radius () const |
| int | adjacency_cut () const |
| int | max_iterations () const |
| int | iratch () const |
| double | overlap_threshold () const |
| virtual std::string | description () const |
| return a textual description of the jet-definition implemented in this plugin | |
| virtual void | run_clustering (ClusterSequence &) const |
given a ClusterSequence that has been filled up with initial particles, the following function should fill up the rest of the ClusterSequence, using the following member functions of ClusterSequence:
| |
Private Member Functions | |
| void | _insert_unique (PseudoJet &jet, std::map< double, int > &jetmap) const |
| given a jet try inserting its energy into the map -- if that energy entry already exists, modify the jet infinitesimally so as ensure that the jet energy is unique | |
Private Attributes | |
| double | _seed_threshold |
| double | _cone_radius |
| int | _adjacency_cut |
| int | _max_iterations |
| int | _iratch |
| double | _overlap_threshold |
Definition at line 44 of file CDFJetCluPlugin.hh.
|
||||||||||||||||
|
a compact constructor
Definition at line 47 of file CDFJetCluPlugin.hh. 00049 : 00050 _seed_threshold ( seed_threshold ), 00051 _cone_radius ( cone_radius ), 00052 _adjacency_cut ( 2 ), 00053 _max_iterations ( 100 ), 00054 _iratch ( 1 ), 00055 _overlap_threshold ( overlap_threshold ) {}
|
|
||||||||||||||||||||||||||||
|
a constructor that looks like the one provided by CDF
Definition at line 58 of file CDFJetCluPlugin.hh. 00064 : 00065 _seed_threshold (seed_threshold ), 00066 _cone_radius (cone_radius ), 00067 _adjacency_cut (adjacency_cut ), 00068 _max_iterations (max_iterations ), 00069 _iratch (iratch ), 00070 _overlap_threshold (overlap_threshold ) {}
|
|
||||||||||||
|
given a jet try inserting its energy into the map -- if that energy entry already exists, modify the jet infinitesimally so as ensure that the jet energy is unique
Definition at line 151 of file CDFJetCluPlugin.cc. Referenced by run_clustering(). 00152 {
00153 while (jetmap.find(jet.E()) != jetmap.end()) {
00154 // deal with cases where something else has the same energy, and
00155 // also with situation where that energy is zero.
00156 if (jet.E() != 0.0) {
00157 jet *= 1.0+1e-12;
00158 } else {
00159 jet += PseudoJet(0.0,0.0,0.0,1e-300);
00160 }
00161 }
00162 jetmap[jet.E()] = jet.cluster_hist_index();
00163 }
|
|
|
Definition at line 75 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00075 {return _adjacency_cut ;}
|
|
|
Definition at line 74 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00074 {return _cone_radius ;}
|
|
|
return a textual description of the jet-definition implemented in this plugin
Implements fastjet::JetDefinition::Plugin. Definition at line 44 of file CDFJetCluPlugin.cc. References adjacency_cut(), cone_radius(), iratch(), max_iterations(), overlap_threshold(), and seed_threshold(). 00044 {
00045 ostringstream desc;
00046
00047 desc << "CDF JetClu jet algorithm with "
00048 << "seed_threshold = " << seed_threshold () << ", "
00049 << "cone_radius = " << cone_radius () << ", "
00050 << "adjacency_cut = " << adjacency_cut () << ", "
00051 << "max_iterations = " << max_iterations () << ", "
00052 << "iratch = " << iratch () << ", "
00053 << "overlap_threshold = " << overlap_threshold () ;
00054
00055 return desc.str();
00056 }
|
|
|
Definition at line 77 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00077 {return _iratch ;}
|
|
|
Definition at line 76 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00076 {return _max_iterations ;}
|
|
|
Definition at line 78 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00078 {return _overlap_threshold ;}
|
|
|
given a ClusterSequence that has been filled up with initial particles, the following function should fill up the rest of the ClusterSequence, using the following member functions of ClusterSequence:
..)
Implements fastjet::JetDefinition::Plugin. Definition at line 59 of file CDFJetCluPlugin.cc. References _insert_unique(), adjacency_cut(), cone_radius(), fastjet::PseudoJet::E(), iratch(), fastjet::ClusterSequence::jets(), max_iterations(), overlap_threshold(), fastjet::ClusterSequence::plugin_record_iB_recombination(), fastjet::ClusterSequence::plugin_record_ij_recombination(), fastjet::PseudoJet::px(), fastjet::PseudoJet::py(), fastjet::PseudoJet::pz(), and seed_threshold(). 00059 {
00060
00061 // create the physics towers needed by the CDF code
00062 vector<PhysicsTower> towers;
00063 towers.reserve(clust_seq.jets().size());
00064
00065 // create a map to identify jets (actually just the input particles)...
00066 map<double,int> jetmap;
00067
00068 for (unsigned i = 0; i < clust_seq.jets().size(); i++) {
00069 PseudoJet particle(clust_seq.jets()[i]);
00070 _insert_unique(particle, jetmap);
00071 LorentzVector fourvect(particle.px(), particle.py(),
00072 particle.pz(), particle.E());
00073 PhysicsTower tower(fourvect);
00074 // cannot use MidPoint trick of misusing one of the indices for
00075 // tracking, since the JetClu implementation _does_ seem to make
00076 // use of these indices
00077 //tower.calTower.iEta = i;
00078 towers.push_back(tower);
00079 }
00080
00081 // prepare the CDF algorithm
00082 JetCluAlgorithm j(seed_threshold(), cone_radius(), adjacency_cut(),
00083 max_iterations(), iratch(), overlap_threshold());
00084
00085 // run the CDF algorithm
00086 std::vector<Cluster> jets;
00087 j.run(towers,jets);
00088
00089
00090 // now transfer the jets back into our own structure -- we will
00091 // mimic the cone code with a sequential recombination sequence in
00092 // which the jets are built up by adding one particle at a time
00093
00094 // NB: with g++-4.0, the reverse iterator code gave problems, so switch
00095 // to indices instead
00096 //for(vector<Cluster>::const_reverse_iterator jetIter = jets.rbegin();
00097 // jetIter != jets.rend(); jetIter++) {
00098 // const vector<PhysicsTower> & tower_list = jetIter->towerList;
00099 // int jet_k = jetmap[tower_list[0].fourVector.E];
00100 //
00101 // int ntow = int(jetIter->towerList.size());
00102
00103 for(int iCDFjets = jets.size()-1; iCDFjets >= 0; iCDFjets--) {
00104 const vector<PhysicsTower> & tower_list = jets[iCDFjets].towerList;
00105 int jet_k = jetmap[tower_list[0].fourVector.E];
00106
00107 int ntow = int(tower_list.size());
00108 for (int itow = 1; itow < ntow; itow++) {
00109 int jet_i = jet_k;
00110 // retrieve our misappropriated index for the jet
00111 //int jet_j = tower_list[itow].calTower.iEta;
00112 int jet_j = jetmap[tower_list[itow].fourVector.E];
00113 // do a fake recombination step with dij=0
00114 double dij = 0.0;
00115 // JetClu does E-scheme recombination so we can stick with the
00116 // simple option
00117 clust_seq.plugin_record_ij_recombination(jet_i, jet_j, dij, jet_k);
00118
00119 //if (itow != ntow) {
00120 // clust_seq.plugin_record_ij_recombination(jet_i, jet_j, dij, jet_k);
00121 //} else {
00122 // clust_seq.plugin_record_ij_recombination(jet_i, jet_j, dij,
00123 // PseudoJet(jetIter->fourVector.px,jetIter->fourVector.py,
00124 // jetIter->fourVector.pz,jetIter->fourVector.E),
00125 // jet_k);
00126 //}
00127 }
00128
00129 // NB: put a sensible looking d_iB just to be nice...
00130 double d_iB = clust_seq.jets()[jet_k].perp2();
00131 clust_seq.plugin_record_iB_recombination(jet_k, d_iB);
00132 }
00133
00134
00135 // following code is for testing only
00136 //cout << endl;
00137 //for(vector<Cluster>::const_iterator jetIter = jets.begin();
00138 // jetIter != jets.end(); jetIter++) {
00139 // cout << jetIter->fourVector.pt() << " " << jetIter->fourVector.y() << endl;
00140 //}
00141 //cout << "-----------------------------------------------------\n";
00142 //vector<PseudoJet> ourjets(clust_seq.inclusive_jets());
00143 //for (vector<PseudoJet>::const_iterator ourjet = ourjets.begin();
00144 // ourjet != ourjets.end(); ourjet++) {
00145 // cout << ourjet->perp() << " " << ourjet->rap() << endl;
00146 //}
00147 //cout << endl;
00148 }
|
|
|
Definition at line 73 of file CDFJetCluPlugin.hh. Referenced by description(), and run_clustering(). 00073 {return _seed_threshold ;}
|
|
|
Definition at line 91 of file CDFJetCluPlugin.hh. |
|
|
Definition at line 90 of file CDFJetCluPlugin.hh. |
|
|
Definition at line 93 of file CDFJetCluPlugin.hh. |
|
|
Definition at line 92 of file CDFJetCluPlugin.hh. |
|
|
Definition at line 94 of file CDFJetCluPlugin.hh. |
|
|
Definition at line 89 of file CDFJetCluPlugin.hh. |
1.4.2