Changeset 49234af in git for external/fastjet/Selector.hh
- Timestamp:
- Dec 9, 2014, 1:27:13 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 37deb3b, 9e991f8
- Parents:
- f6b6ee7 (diff), e7e90df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/fastjet/Selector.hh
rf6b6ee7 r49234af 2 2 #define __FASTJET_SELECTOR_HH__ 3 3 4 // STARTHEADER5 // $Id: Selector.hh 3 203 2013-09-15 07:49:50Z salam $6 // 7 // Copyright (c) 2009-201 1, Matteo Cacciari, Gavin P. Salam and Gregory Soyez4 //FJSTARTHEADER 5 // $Id: Selector.hh 3711 2014-09-29 13:54:51Z salam $ 6 // 7 // Copyright (c) 2009-2014, Matteo Cacciari, Gavin P. Salam and Gregory Soyez 8 8 // 9 9 //---------------------------------------------------------------------- … … 16 16 // 17 17 // The algorithms that underlie FastJet have required considerable 18 // development and are described in hep-ph/0512210. If you use 18 // development. They are described in the original FastJet paper, 19 // hep-ph/0512210 and in the manual, arXiv:1111.6097. If you use 19 20 // FastJet as part of work towards a scientific publication, please 20 // include a citation to the FastJet paper. 21 // quote the version you use and include a citation to the manual and 22 // optionally also to hep-ph/0512210. 21 23 // 22 24 // FastJet is distributed in the hope that it will be useful, … … 28 30 // along with FastJet. If not, see <http://www.gnu.org/licenses/>. 29 31 //---------------------------------------------------------------------- 30 // ENDHEADER32 //FJENDHEADER 31 33 32 34 #include "fastjet/PseudoJet.hh" … … 67 69 //---------------------------------------------------------- 68 70 69 /// returns true if a given object passes the selection criterion. 70 /// This has to be overloaded by derived workers 71 /// returns true if a given object passes the selection criterion, 72 /// and is the main function that needs to be overloaded by derived 73 /// workers. 74 /// 75 /// NB: this function is used only if applies_jet_by_jet() returns 76 /// true. If it does not, then derived classes are expected to 77 /// (re)implement the terminator function() 71 78 virtual bool pass(const PseudoJet & jet) const = 0; 72 79 73 80 /// For each jet that does not pass the cuts, this routine sets the 74 /// pointer to 0. 75 /// 76 /// It does not assume that the PseudoJet* passed as argume tnare not NULL81 /// pointer to 0. 82 /// 83 /// It does not assume that the PseudoJet* passed as argument are not NULL 77 84 virtual void terminator(std::vector<const PseudoJet *> & jets) const { 78 85 for (unsigned i = 0; i < jets.size(); i++) { … … 133 140 throw Error("this selector has no computable area"); 134 141 } 142 135 143 }; 136 144 … … 151 159 Selector(SelectorWorker * worker_in) {_worker.reset(worker_in);} 152 160 153 154 161 #ifndef __FJCORE__ 155 162 /// ctor from a RangeDefinition … … 186 193 /// passes and then evaluating the size of the vector 187 194 unsigned int count(const std::vector<PseudoJet> & jets) const; 195 196 /// Return the 4-vector sum of the objects that pass the selection. 197 /// 198 /// This will often be more efficient that getting the vector of objects that 199 /// passes and then evaluating the size of the vector 200 PseudoJet sum(const std::vector<PseudoJet> & jets) const; 201 202 /// Return the scalar pt sum of the objects that pass the selection. 203 /// 204 /// This will often be more efficient that getting the vector of objects that 205 /// passes and then evaluating the size of the vector 206 double scalar_pt_sum(const std::vector<PseudoJet> & jets) const; 188 207 189 208 /// sift the input jets into two vectors -- those that pass the selector … … 286 305 } 287 306 288 /// class that gets throw when a Selector is applied despite it not307 /// class that gets thrown when a Selector is applied despite it not 289 308 /// having a valid underlying worker. 290 309 class InvalidWorker : public Error { … … 293 312 }; 294 313 295 /// class that gets throw when a Selector is applied despite it not296 /// having a valid underlying worker.314 /// class that gets thrown when the area is requested from a Selector for which 315 /// the area is not meaningful 297 316 class InvalidArea : public Error { 298 317 public: … … 433 452 /// select objets within a distance 'radius' from the location of the 434 453 /// reference jet, set by Selector::set_reference(...) 435 Selector SelectorCircle(const double &radius);454 Selector SelectorCircle(const double radius); 436 455 437 456 /// select objets with distance from the reference jet is between 'radius_in' 438 457 /// and 'radius_out'; the reference jet is set by Selector::set_reference(...) 439 Selector SelectorDoughnut(const double & radius_in, const double &radius_out);458 Selector SelectorDoughnut(const double radius_in, const double radius_out); 440 459 441 460 /// select objets within a rapidity distance 'half_width' from the 442 461 /// location of the reference jet, set by Selector::set_reference(...) 443 Selector SelectorStrip(const double &half_width);462 Selector SelectorStrip(const double half_width); 444 463 445 464 /// select objets within rapidity distance 'half_rap_width' from the 446 465 /// reference jet and azimuthal-angle distance within 'half_phi_width'; the 447 466 /// reference jet is set by Selector::set_reference(...) 448 Selector SelectorRectangle(const double & half_rap_width, const double &half_phi_width);467 Selector SelectorRectangle(const double half_rap_width, const double half_phi_width); 449 468 450 469
Note:
See TracChangeset
for help on using the changeset viewer.