Public Member Functions | |
TemporaryJet (float seedET) | |
TemporaryJet (float seedET, float y, float phi) | |
~TemporaryJet () | |
float | dist (TemporaryJet &jet) const |
void | midpoint (const TemporaryJet &jet, float &y, float &phi) const |
bool | is_stable (const std::list< const Item * > &itemlist, float radius, float min_ET, int max_iterations=50) |
Definition at line 200 of file ILConeAlgorithm.hpp.
fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::TemporaryJet | ( | float | seedET | ) | [inline] |
Definition at line 205 of file ILConeAlgorithm.hpp.
fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::TemporaryJet | ( | float | seedET, | |
float | y, | |||
float | phi | |||
) | [inline] |
Definition at line 207 of file ILConeAlgorithm.hpp.
fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::~TemporaryJet | ( | ) | [inline] |
Definition at line 210 of file ILConeAlgorithm.hpp.
float fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::dist | ( | TemporaryJet & | jet | ) | const [inline] |
Definition at line 212 of file ILConeAlgorithm.hpp.
References fastjet::d0::ProtoJet< Item >::phi(), fastjet::d0::RDelta(), and fastjet::d0::ProtoJet< Item >::y().
bool fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::is_stable | ( | const std::list< const Item * > & | itemlist, | |
float | radius, | |||
float | min_ET, | |||
int | max_iterations = 50 | |||
) | [inline] |
Definition at line 250 of file ILConeAlgorithm.hpp.
References fastjet::d0::inline_maths::phi(), and fastjet::d0::RD2().
00253 : max_iterations = 0 will just recompute the jet using the specified cone 00254 { 00255 float radius2 = radius*radius; 00256 float Rcut= 1.E-06; 00257 00258 00259 // ?? if(_Increase_Delta_R) Rcut= 1.E-04; 00260 bool stable= true; 00261 int trial= 0; 00262 float Yst; 00263 float PHIst; 00264 do { 00265 trial++; 00266 //std::cout << " trial " << trial << " " << _y << " " << _phi << std::endl; 00267 Yst = this->_y; 00268 PHIst= this->_phi; 00269 //cout << "is_stable beginning do loop: this->_pT=" << this->_pT << " this->_y=" << this->_y << " this->_phi=" << this->_phi << endl; 00270 this->erase(); 00271 00272 this->setJet(Yst,PHIst,0.0); 00273 00274 00275 #ifdef ILCA_USE_ORDERED_LIST 00276 std::list<const Item*>::const_iterator lower = 00277 lower_bound(itemlist.begin(),itemlist.end(),Yst-radius, 00278 rapidity_order<Item>()); 00279 std::list<const Item*>::const_iterator upper = 00280 upper_bound(itemlist.begin(),itemlist.end(),Yst+radius, 00281 rapidity_order<Item>()); 00282 for(std::list<const Item*>::const_iterator tk = lower; tk != upper; ++tk) { 00283 //std::cout << " is_stable: item y=" << (*tk)->y() << " phi=" << (*tk)->phi() << " RD2=" << RD2((*tk)->y(),(*tk)->phi(),Yst,PHIst) << " " << Yst-radius << " " << Yst+radius << endl; 00284 if(RD2((*tk)->y(),(*tk)->phi(),Yst,PHIst) <= radius2) 00285 { 00286 addItem(*tk); 00287 } 00288 } 00289 #else 00290 #ifdef ILCA_USE_MMAP 00291 // need to loop only on the subset with Yst-R < y < Yst+R 00292 for ( std::multimap<float,const Item*>::const_iterator 00293 tk = items.lower_bound(Yst-radius); 00294 tk != items.upper_bound(Yst+radius); ++tk ) 00295 { 00296 //std::cout << " item " << (*tk)->y() << " " << (*tk)->phi() << " " << RD2((*tk)->y(),(*tk)->phi(),Yst,PHIst) << " " << Yst-radius << " " << Yst+radius << endl; 00297 if(RD2(((*tk).second)->y(),((*tk).second)->phi(),Yst,PHIst) <= radius2) 00298 { 00299 addItem((*tk).second); 00300 } 00301 } 00302 00303 #else 00304 00305 //cout << " is_stable: itemlist.size()=" << itemlist.size() << endl; 00306 for(typename std::list<const Item*>::const_iterator tk = itemlist.begin(); tk != itemlist.end(); ++tk) 00307 { 00308 //std::cout << " is_stable: item (*tk)->y()=" << (*tk)->y() << " (*tk)->phi=" << (*tk)->phi() << " RD2=" << RD2((*tk)->y(),(*tk)->phi(),Yst,PHIst) << " Yst-rad=" << Yst-radius << " Yst+rad=" << Yst+radius << endl; 00309 if(RD2((*tk)->y(),(*tk)->phi(),Yst,PHIst) <= radius2) 00310 { 00311 //cout << "add item to *tk" << endl; 00312 addItem(*tk); 00313 } 00314 } 00315 #endif 00316 #endif 00317 00318 //std::cout << "is_stable, before update: jet this->_y=" << this->_y << " _phi=" << this->_phi << " _pT=" << this->_pT << " min_ET=" << min_ET << std::endl; 00319 this->updateJet(); 00320 //std::cout << "is_stable, after update: jet this->_y=" << this->_y << " _phi=" << this->_phi << " _pT=" << this->_pT << " min_ET=" << min_ET << std::endl; 00321 00322 if(this->_pT < min_ET ) 00323 { 00324 stable= false; 00325 break; 00326 } 00327 //cout << "is_stable end while loop: this->_pT=" << this->_pT << " this->_y=" << this->_y << " this->_phi=" << this->_phi << endl; 00328 } while(RD2(this->_y,this->_phi,Yst,PHIst) >= Rcut && trial <= max_iterations); 00329 //std::cout << " trial stable " << trial << " " << stable << std::endl; 00330 return stable; 00331 }
void fastjet::d0::ILConeAlgorithm< Item >::TemporaryJet::midpoint | ( | const TemporaryJet & | jet, | |
float & | y, | |||
float & | phi | |||
) | const [inline] |
Definition at line 217 of file ILConeAlgorithm.hpp.
References fastjet::d0::ProtoJet< Item >::phi(), fastjet::d0::inline_maths::PI, fastjet::d0::ProtoJet< Item >::pT(), fastjet::d0::inline_maths::TWOPI, and fastjet::d0::ProtoJet< Item >::y().
00218 { 00219 // Midpoint should probably be computed w/4-vectors but don't 00220 // have that info. Preserving Pt-weighted calculation - JPK 00221 float pTsum = this->_pT + jet.pT(); 00222 y = (this->_y*this->_pT + jet.y()*jet.pT())/pTsum; 00223 00224 phi = (this->_phi*this->_pT + jet.phi()*jet.pT())/pTsum; 00225 // careful with phi-wrap area: convert from [0,2pi] to [-pi,pi] 00226 //ls: original D0 code, as of 23/Mar/2007 00227 //if ( abs(phi-this->_phi)>2.0 ) { // assumes cones R=1.14 or smaller, merge within 2R only 00228 //ls: abs bug fixed 26/Mar/2007 00229 if ( fabs(phi-this->_phi)>2.0 ) { // assumes cones R=1.14 or smaller, merge within 2R only 00230 phi = fmod( this->_phi+PI, TWOPI); 00231 if (phi < 0.0) phi += TWOPI; 00232 phi -= PI; 00233 00234 float temp=fmod( jet.phi()+PI, TWOPI); 00235 if (temp < 0.0) temp += TWOPI; 00236 temp -= PI; 00237 00238 phi = (phi*this->_pT + temp*jet.pT()) /pTsum; 00239 } 00240 00241 if ( phi < 0. ) phi += TWOPI; 00242 }