rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
ParticleBaseUtils.hh
1 #ifndef RIVET_PARTICLEBASEUTILS_HH
2 #define RIVET_PARTICLEBASEUTILS_HH
3 
4 #include "Rivet/ParticleBase.hh"
5 
6 namespace Rivet {
7 
8 
9 
14 
15 
17  using ParticleBaseSelector = function<bool(const ParticleBase&)>;
19  using ParticleBaseSorter = function<bool(const ParticleBase&, const ParticleBase&)>;
20 
21 
24  virtual bool operator()(const ParticleBase& p) const = 0;
25  virtual ~BoolParticleBaseFunctor() {}
26  };
27 
28 
30  struct PtGtr : public BoolParticleBaseFunctor {
31  PtGtr(double pt) : ptcut(pt) { }
32  PtGtr(const FourMomentum& p) : ptcut(p.pT()) { }
33  bool operator()(const ParticleBase& p) const { return p.pT() > ptcut; }
34  double ptcut;
35  };
36  using pTGtr = PtGtr;
37  using ptGtr = PtGtr;
38 
40  struct PtLess : public BoolParticleBaseFunctor {
41  PtLess(const FourMomentum& p) : ptcut(p.pT()) { }
42  PtLess(double pt) : ptcut(pt) { }
43  bool operator()(const ParticleBase& p) const { return p.pT() < ptcut; }
44  double ptcut;
45  };
46  using pTLess = PtLess;
47  using ptLess = PtLess;
48 
51  PtInRange(pair<double, double> ptcuts) : ptcut(ptcuts) { }
52  PtInRange(double ptlow, double pthigh) : PtInRange(make_pair(ptlow, pthigh)) { }
53  PtInRange(const FourMomentum& p1, const FourMomentum& p2) : PtInRange(p1.pT(), p2.pT()) { }
54  bool operator()(const ParticleBase& p) const { return p.pT() >= ptcut.first && p.pT() < ptcut.second; }
55  pair<double,double> ptcut;
56  };
57  using pTInRange = PtInRange;
58  using ptInRange = PtInRange;
59 
60 
62  struct EtaGtr : public BoolParticleBaseFunctor {
63  EtaGtr(double eta) : etacut(eta) { }
64  EtaGtr(const FourMomentum& p) : etacut(p.eta()) { }
65  bool operator()(const ParticleBase& p) const { return p.eta() > etacut; }
66  double etacut;
67  };
68  using etaGtr = EtaGtr;
69 
71  struct EtaLess : public BoolParticleBaseFunctor {
72  EtaLess(double eta) : etacut(eta) { }
73  EtaLess(const FourMomentum& p) : etacut(p.eta()) { }
74  bool operator()(const ParticleBase& p) const { return p.eta() < etacut; }
75  double etacut;
76  };
77  using etaLess = EtaLess;
78 
81  EtaInRange(pair<double, double> etacuts) : etacut(etacuts) { }
82  EtaInRange(double etalow, double etahigh) : EtaInRange(make_pair(etalow, etahigh)) { }
83  EtaInRange(const FourMomentum& p1, const FourMomentum& p2) : EtaInRange(p1.eta(), p2.eta()) { }
84  bool operator()(const ParticleBase& p) const { return p.eta() >= etacut.first && p.eta() < etacut.second; }
85  pair<double,double> etacut;
86  };
87  using etaInRange = EtaInRange;
88 
89 
92  AbsEtaGtr(double abseta) : absetacut(abseta) { }
93  AbsEtaGtr(const FourMomentum& p) : absetacut(p.abseta()) { }
94  bool operator()(const ParticleBase& p) const { return p.abseta() > absetacut; }
95  double absetacut;
96  };
97  using absEtaGtr = AbsEtaGtr;
98  using absetaGtr = AbsEtaGtr;
99 
102  AbsEtaLess(double abseta) : absetacut(abseta) { }
103  AbsEtaLess(const FourMomentum& p) : absetacut(p.abseta()) { }
104  bool operator()(const ParticleBase& p) const { return p.abseta() < absetacut; }
105  double absetacut;
106  };
107  using absEtaLess = AbsEtaLess;
108  using absetaLess = AbsEtaLess;
109 
112  AbsEtaInRange(const pair<double, double>& absetacuts) : absetacut(absetacuts) { }
113  AbsEtaInRange(double absetalow, double absetahigh) : AbsEtaInRange(make_pair(absetalow, absetahigh)) { }
114  AbsEtaInRange(const FourMomentum& p1, const FourMomentum& p2) : AbsEtaInRange(p1.abseta(), p2.abseta()) { }
115  bool operator()(const ParticleBase& p) const { return p.abseta() >= absetacut.first && p.abseta() < absetacut.second; }
116  pair<double,double> absetacut;
117  };
120 
121 
123  struct RapGtr : public BoolParticleBaseFunctor {
124  RapGtr(double rap) : rapcut(rap) { }
125  RapGtr(const FourMomentum& p) : rapcut(p.rap()) { }
126  bool operator()(const ParticleBase& p) const { return p.rap() > rapcut; }
127  double rapcut;
128  };
129  using rapGtr = RapGtr;
130 
133  RapLess(double rap) : rapcut(rap) { }
134  RapLess(const FourMomentum& p) : rapcut(p.rap()) { }
135  bool operator()(const ParticleBase& p) const { return p.rap() < rapcut; }
136  double rapcut;
137  };
138  using rapLess = RapLess;
139 
142  RapInRange(const pair<double, double>& rapcuts) : rapcut(rapcuts) { }
143  RapInRange(double raplow, double raphigh) : RapInRange(make_pair(raplow, raphigh)) { }
144  RapInRange(const FourMomentum& p1, const FourMomentum& p2) : RapInRange(p1.rap(), p2.rap()) { }
145  bool operator()(const ParticleBase& p) const { return p.rap() >= rapcut.first && p.rap() < rapcut.second; }
146  pair<double,double> rapcut;
147  };
148  using rapInRange = RapInRange;
149 
150 
153  AbsRapGtr(double absrap) : absrapcut(absrap) { }
154  AbsRapGtr(const FourMomentum& p) : absrapcut(p.absrap()) { }
155  bool operator()(const ParticleBase& p) const { return p.absrap() > absrapcut; }
156  double absrapcut;
157  };
158  using absRapGtr = AbsRapGtr;
159  using absrapGtr = AbsRapGtr;
160 
163  AbsRapLess(double absrap) : absrapcut(absrap) { }
164  AbsRapLess(const FourMomentum& p) : absrapcut(p.absrap()) { }
165  bool operator()(const ParticleBase& p) const { return p.absrap() < absrapcut; }
166  double absrapcut;
167  };
168  using absRapLess = AbsRapLess;
169  using absrapLess = AbsRapLess;
170 
173  AbsRapInRange(const pair<double, double>& absrapcuts) : absrapcut(absrapcuts) { }
174  AbsRapInRange(double absraplow, double absraphigh) : AbsRapInRange(make_pair(absraplow, absraphigh)) { }
175  AbsRapInRange(const FourMomentum& p1, const FourMomentum& p2) : AbsRapInRange(p1.absrap(), p2.absrap()) { }
176  bool operator()(const ParticleBase& p) const { return p.absrap() >= absrapcut.first && p.absrap() < absrapcut.second; }
177  pair<double,double> absrapcut;
178  };
181 
182 
184 
185 
188  DeltaRGtr(const ParticleBase& vec, double dr, RapScheme scheme=PSEUDORAPIDITY)
189  : refvec(vec.mom()), drcut(dr), rapscheme(scheme) { }
190  DeltaRGtr(const FourMomentum& vec, double dr, RapScheme scheme=PSEUDORAPIDITY)
191  : refvec(vec), drcut(dr), rapscheme(scheme) { }
192  DeltaRGtr(const Vector3& vec, double dr)
193  : drcut(dr), rapscheme(PSEUDORAPIDITY) { refvec.setPx(vec.x()); refvec.setPy(vec.y()); refvec.setPz(vec.z()); }
194  bool operator()(const ParticleBase& p) const { return deltaR(p, refvec, rapscheme) > drcut; }
195  FourMomentum refvec;
196  double drcut;
197  RapScheme rapscheme;
198  };
199  using deltaRGtr = DeltaRGtr;
200 
203  DeltaRLess(const ParticleBase& vec, double dr, RapScheme scheme=PSEUDORAPIDITY)
204  : refvec(vec.mom()), drcut(dr), rapscheme(scheme) { }
205  DeltaRLess(const FourMomentum& vec, double dr, RapScheme scheme=PSEUDORAPIDITY)
206  : refvec(vec), drcut(dr), rapscheme(scheme) { }
207  DeltaRLess(const Vector3& vec, double dr)
208  : drcut(dr), rapscheme(PSEUDORAPIDITY) { refvec.setPx(vec.x()); refvec.setPy(vec.y()); refvec.setPz(vec.z()); }
209  bool operator()(const ParticleBase& p) const { return deltaR(p, refvec, rapscheme) < drcut; }
210  FourMomentum refvec;
211  double drcut;
212  RapScheme rapscheme;
213  };
214  using deltaRLess = DeltaRLess;
215 
218  DeltaRInRange(const ParticleBase& vec, const pair<double,double>& dr, RapScheme scheme=PSEUDORAPIDITY)
219  : refvec(vec.mom()), drcut(dr), rapscheme(scheme) { }
220  DeltaRInRange(const ParticleBase& vec, double drmin, double drmax, RapScheme scheme=PSEUDORAPIDITY)
221  : DeltaRInRange(vec, make_pair(drmin, drmax), scheme) { }
222  DeltaRInRange(const FourMomentum& vec, const pair<double,double>& dr, RapScheme scheme=PSEUDORAPIDITY)
223  : refvec(vec), drcut(dr), rapscheme(scheme) { }
224  DeltaRInRange(const FourMomentum& vec, double drmin, double drmax, RapScheme scheme=PSEUDORAPIDITY)
225  : DeltaRInRange(vec, make_pair(drmin, drmax), scheme) { }
226  DeltaRInRange(const Vector3& vec, const pair<double,double>& dr)
227  : drcut(dr), rapscheme(PSEUDORAPIDITY) { refvec.setPx(vec.x()); refvec.setPy(vec.y()); refvec.setPz(vec.z()); }
228  DeltaRInRange(const Vector3& vec, double drmin, double drmax)
229  : DeltaRInRange(vec, make_pair(drmin, drmax)) { }
230  bool operator()(const ParticleBase& p) const {
231  const double dR = deltaR(p, refvec, rapscheme);
232  return dR >= drcut.first && dR < drcut.second;
233  }
234  FourMomentum refvec;
235  pair<double,double> drcut;
236  RapScheme rapscheme;
237  };
239 
240 
243  DeltaPhiGtr(const ParticleBase& vec, double dphi)
244  : refvec(vec.p3()), dphicut(dphi) { }
245  DeltaPhiGtr(const FourMomentum& vec, double dphi)
246  : refvec(vec.p3()), dphicut(dphi) { }
247  DeltaPhiGtr(const Vector3& vec, double dphi)
248  : refvec(vec), dphicut(dphi) { }
249  bool operator()(const ParticleBase& p) const { return deltaPhi(p, refvec) > dphicut; }
250  Vector3 refvec;
251  double dphicut;
252  };
253  using deltaPhiGtr = DeltaPhiGtr;
254 
257  DeltaPhiLess(const ParticleBase& vec, double dphi)
258  : refvec(vec.p3()), dphicut(dphi) { }
259  DeltaPhiLess(const FourMomentum& vec, double dphi)
260  : refvec(vec.p3()), dphicut(dphi) { }
261  DeltaPhiLess(const Vector3& vec, double dphi)
262  : refvec(vec), dphicut(dphi) { }
263  bool operator()(const ParticleBase& p) const { return deltaPhi(p, refvec) < dphicut; }
264  Vector3 refvec;
265  double dphicut;
266  };
267  using deltaPhiLess = DeltaPhiLess;
268 
271  DeltaPhiInRange(const ParticleBase& vec, const pair<double,double>& dphi)
272  : refvec(vec.mom()), dphicut(dphi) { }
273  DeltaPhiInRange(const ParticleBase& vec, double dphimin, double dphimax)
274  : DeltaPhiInRange(vec, make_pair(dphimin, dphimax)) { }
275  DeltaPhiInRange(const FourMomentum& vec, const pair<double,double>& dphi)
276  : refvec(vec), dphicut(dphi) { }
277  DeltaPhiInRange(const FourMomentum& vec, double dphimin, double dphimax)
278  : DeltaPhiInRange(vec, make_pair(dphimin, dphimax)) { }
279  DeltaPhiInRange(const Vector3& vec, const pair<double,double>& dphi)
280  : refvec(vec), dphicut(dphi) { }
281  DeltaPhiInRange(const Vector3& vec, double dphimin, double dphimax)
282  : DeltaPhiInRange(vec, make_pair(dphimin, dphimax)) { }
283  bool operator()(const ParticleBase& p) const {
284  const double dphi = deltaPhi(p, refvec);
285  return dphi >= dphicut.first && dphi < dphicut.second;
286  }
287  Vector3 refvec;
288  pair<double,double> dphicut;
289  };
291 
292 
295  DeltaEtaGtr(const ParticleBase& vec, double deta)
296  : refvec(vec.p3()), detacut(deta) { }
297  DeltaEtaGtr(const FourMomentum& vec, double deta)
298  : refvec(vec.p3()), detacut(deta) { }
299  DeltaEtaGtr(const Vector3& vec, double deta)
300  : refvec(vec), detacut(deta) { }
301  bool operator()(const ParticleBase& p) const { return std::abs(deltaEta(p, refvec)) > detacut; }
302  Vector3 refvec;
303  double detacut;
304  };
305  using deltaEtaGtr = DeltaEtaGtr;
306 
309  DeltaEtaLess(const ParticleBase& vec, double deta)
310  : refvec(vec.p3()), detacut(deta) { }
311  DeltaEtaLess(const FourMomentum& vec, double deta)
312  : refvec(vec.p3()), detacut(deta) { }
313  DeltaEtaLess(const Vector3& vec, double deta)
314  : refvec(vec), detacut(deta) { }
315  bool operator()(const ParticleBase& p) const { return std::abs(deltaEta(p, refvec)) < detacut; }
316  Vector3 refvec;
317  double detacut;
318  };
319  using deltaEtaLess = DeltaEtaLess;
320 
323  DeltaEtaInRange(const ParticleBase& vec, const pair<double,double>& deta)
324  : refvec(vec.mom()), detacut(deta) { }
325  DeltaEtaInRange(const ParticleBase& vec, double detamin, double detamax)
326  : DeltaEtaInRange(vec, make_pair(detamin, detamax)) { }
327  DeltaEtaInRange(const FourMomentum& vec, const pair<double,double>& deta)
328  : refvec(vec), detacut(deta) { }
329  DeltaEtaInRange(const FourMomentum& vec, double detamin, double detamax)
330  : DeltaEtaInRange(vec, make_pair(detamin, detamax)) { }
331  DeltaEtaInRange(const Vector3& vec, const pair<double,double>& deta)
332  : refvec(vec), detacut(deta) { }
333  DeltaEtaInRange(const Vector3& vec, double detamin, double detamax)
334  : DeltaEtaInRange(vec, make_pair(detamin, detamax)) { }
335  bool operator()(const ParticleBase& p) const {
336  const double deta = deltaEta(p, refvec);
337  return deta >= detacut.first && deta < detacut.second;
338  }
339  Vector3 refvec;
340  pair<double,double> detacut;
341  };
343 
344 
347  DeltaRapGtr(const ParticleBase& vec, double drap)
348  : refvec(vec.mom()), drapcut(drap) { }
349  DeltaRapGtr(const FourMomentum& vec, double drap)
350  : refvec(vec), drapcut(drap) { }
351  bool operator()(const ParticleBase& p) const { return std::abs(deltaRap(p, refvec)) > drapcut; }
352  FourMomentum refvec;
353  double drapcut;
354  };
355  using deltaRapGtr = DeltaRapGtr;
356 
359  DeltaRapLess(const ParticleBase& vec, double drap)
360  : refvec(vec.mom()), drapcut(drap) { }
361  DeltaRapLess(const FourMomentum& vec, double drap)
362  : refvec(vec), drapcut(drap) { }
363  bool operator()(const ParticleBase& p) const { return std::abs(deltaRap(p, refvec)) < drapcut; }
364  FourMomentum refvec;
365  double drapcut;
366  };
367  using deltaRapLess = DeltaRapLess;
368 
371  DeltaRapInRange(const ParticleBase& vec, const pair<double,double>& drap)
372  : refvec(vec.mom()), drapcut(drap) { }
373  DeltaRapInRange(const ParticleBase& vec, double drapmin, double drapmax)
374  : DeltaRapInRange(vec, make_pair(drapmin, drapmax)) { }
375  DeltaRapInRange(const FourMomentum& vec, const pair<double,double>& drap)
376  : refvec(vec), drapcut(drap) { }
377  DeltaRapInRange(const FourMomentum& vec, double drapmin, double drapmax)
378  : DeltaRapInRange(vec, make_pair(drapmin, drapmax)) { }
379  bool operator()(const ParticleBase& p) const {
380  const double drap = deltaRap(p, refvec);
381  return drap >= drapcut.first && drap < drapcut.second;
382  }
383  FourMomentum refvec;
384  pair<double,double> drapcut;
385  };
387 
389 
390 
395 
396 
399  virtual double operator()(const ParticleBase& p) const = 0;
400  virtual ~DoubleParticleBaseFunctor() {}
401  };
402 
405  DeltaRWRT(const ParticleBase& pb, RapScheme scheme=PSEUDORAPIDITY) : p(pb.mom()), rapscheme(scheme) {}
406  DeltaRWRT(const FourMomentum& p4, RapScheme scheme=PSEUDORAPIDITY) : p(p4), rapscheme(scheme) {}
407  DeltaRWRT(const Vector3& p3) : p(p3.mod(), p3.x(), p3.y(), p3.z()), rapscheme(PSEUDORAPIDITY) {}
408  double operator()(const ParticleBase& pb) const { return deltaR(p, pb, rapscheme); }
409  double operator()(const FourMomentum& p4) const { return deltaR(p, p4, rapscheme); }
410  double operator()(const Vector3& p3) const { return deltaR(p, p3); }
411  const FourMomentum p;
412  RapScheme rapscheme;
413  };
414  using deltaRWRT = DeltaRWRT;
415 
418  DeltaPhiWRT(const ParticleBase& pb) : p(pb.mom().vector3()) {}
419  DeltaPhiWRT(const FourMomentum& p4) : p(p4.vector3()) {}
420  DeltaPhiWRT(const Vector3& p3) : p(p3) {}
421  double operator()(const ParticleBase& pb) const { return deltaPhi(p, pb); }
422  double operator()(const FourMomentum& p4) const { return deltaPhi(p, p4); }
423  double operator()(const Vector3& p3) const { return deltaPhi(p, p3); }
424  const Vector3 p;
425  };
426  using deltaPhiWRT = DeltaPhiWRT;
427 
430  DeltaEtaWRT(const ParticleBase& pb) : p(pb.mom().vector3()) {}
431  DeltaEtaWRT(const FourMomentum& p4) : p(p4.vector3()) {}
432  DeltaEtaWRT(const Vector3& p3) : p(p3) {}
433  double operator()(const ParticleBase& pb) const { return deltaEta(p, pb); }
434  double operator()(const FourMomentum& p4) const { return deltaEta(p, p4); }
435  double operator()(const Vector3& p3) const { return deltaEta(p, p3); }
436  const Vector3 p;
437  };
438  using deltaEtaWRT = DeltaEtaWRT;
439 
442  AbsDeltaEtaWRT(const ParticleBase& pb) : p(pb.mom().vector3()) {}
443  AbsDeltaEtaWRT(const FourMomentum& p4) : p(p4.vector3()) {}
444  AbsDeltaEtaWRT(const Vector3& p3) : p(p3) {}
445  double operator()(const ParticleBase& pb) const { return fabs(deltaEta(p, pb)); }
446  double operator()(const FourMomentum& p4) const { return fabs(deltaEta(p, p4)); }
447  double operator()(const Vector3& p3) const { return fabs(deltaEta(p, p3)); }
448  const Vector3 p;
449  };
451 
454  DeltaRapWRT(const ParticleBase& pb) : p(pb.mom()) {}
455  DeltaRapWRT(const FourMomentum& p4) : p(p4) {}
456  double operator()(const ParticleBase& pb) const { return deltaRap(p, pb); }
457  double operator()(const FourMomentum& p4) const { return deltaRap(p, p4); }
458  const FourMomentum p;
459  };
460  using deltaRapWRT = DeltaRapWRT;
461 
464  AbsDeltaRapWRT(const ParticleBase& pb) : p(pb.mom()) {}
465  AbsDeltaRapWRT(const FourMomentum& p4) : p(p4) {}
466  double operator()(const ParticleBase& pb) const { return fabs(deltaRap(p, pb)); }
467  double operator()(const FourMomentum& p4) const { return fabs(deltaRap(p, p4)); }
468  const FourMomentum p;
469  };
471 
473 
474 
476 
477 
478  template<typename PBCONTAINER1, typename PBCONTAINER2>
479  void idiscardIfAnyDeltaRLess(PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dR) {
480  for (const ParticleBase& pb : tocompare)
481  ifilter_discard(tofilter, deltaRLess(pb, dR));
482  }
483 
484  template<typename PBCONTAINER1, typename PBCONTAINER2>
485  PBCONTAINER1 discardIfAnyDeltaRLess(const PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dR) {
486  PBCONTAINER1 tmp{tofilter};
487  idiscardIfAnyDeltaRLess(tmp, tocompare, dR);
488  return tmp;
489  }
490 
491  template<typename PBCONTAINER1, typename PBCONTAINER2>
492  void idiscardIfAnyDeltaPhiLess(PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dphi) {
493  for (const ParticleBase& pb : tocompare)
494  ifilter_discard(tofilter, deltaPhiLess(pb, dphi));
495  }
496 
497  template<typename PBCONTAINER1, typename PBCONTAINER2>
498  PBCONTAINER1 discardIfAnyDeltaPhiLess(const PBCONTAINER1& tofilter, const PBCONTAINER2& tocompare, double dphi) {
499  PBCONTAINER1 tmp{tofilter};
500  idiscardIfAnyDeltaPhiLess(tmp, tocompare, dphi);
501  return tmp;
502  }
503 
505 
506 
510 
511  namespace Kin {
512 
514  inline FourMomentum mom(const ParticleBase& p) { return p.mom(); }
516  inline FourMomentum p4(const ParticleBase& p) { return p.mom(); }
517 
519  inline Vector3 p3(const ParticleBase& p) { return p.p3(); }
520 
522  inline Vector3 pTvec(const ParticleBase& p) { return p.pTvec(); }
523 
525  inline double p(const ParticleBase& p) { return p.p(); }
526 
528  inline double pT(const ParticleBase& p) { return p.pT(); }
529 
531  inline double Et(const ParticleBase& p) { return p.Et(); }
532 
534  inline double eta(const ParticleBase& p) { return p.eta(); }
535 
537  inline double abseta(const ParticleBase& p) { return p.abseta(); }
538 
540  inline double rap(const ParticleBase& p) { return p.rap(); }
541 
543  inline double absrap(const ParticleBase& p) { return p.absrap(); }
544 
546  inline double mass(const ParticleBase& p) { return p.mass(); }
547 
548 
550  inline double pairPt(const ParticleBase& p1, const ParticleBase& p2) { return (p1.mom() + p2.mom()).pT(); }
551 
553  inline double pairMass(const ParticleBase& p1, const ParticleBase& p2) { return (p1.mom() + p2.mom()).mass(); }
554 
555  }
557 
558 
559  // Import Kin namespace into Rivet
560  using namespace Kin;
561 
562 
563 }
564 
565 #endif
Definition: ALICE_2010_I880049.cc:13
double abseta() const
Get the directly (alias).
Definition: Vector4.hh:159
double pT() const
Calculate the transverse momentum .
Definition: Vector4.hh:628
Abs pseudorapidity greater-than functor.
Definition: ParticleBaseUtils.hh:91
double eta() const
Synonym for pseudorapidity.
Definition: Vector4.hh:152
Pseudorapidity less-than functor.
Definition: ParticleBaseUtils.hh:71
Base type for Particle -> double functors.
Definition: ParticleBaseUtils.hh:398
double absrap() const
Absolute rapidity.
Definition: Vector4.hh:605
(with respect to another momentum, vec) greater-than functor
Definition: ParticleBaseUtils.hh:346
(with respect to another momentum, vec) greater-than functor
Definition: ParticleBaseUtils.hh:294
Abs pseudorapidity momentum less-than functor.
Definition: ParticleBaseUtils.hh:101
const FourMomentum & mom() const
Get equivalent single momentum four-vector (const) (alias).
Definition: ParticleBase.hh:39
double abseta() const
Get the directly (alias).
Definition: ParticleBase.hh:91
double deltaRap(double y1, double y2)
Definition: MathUtils.hh:584
Vector3 p3() const
Get 3-momentum part, .
Definition: Vector4.hh:578
Pseudorapidity in-range functor.
Definition: ParticleBaseUtils.hh:80
Abs rapidity in-range functor.
Definition: ParticleBaseUtils.hh:172
Jets & ifilter_discard(Jets &jets, const Cut &c)
Filter a jet collection in-place to the subset that fails the supplied Cut.
Definition: JetUtils.cc:14
Base type for Particle -> bool functors.
Definition: ParticleBaseUtils.hh:23
double mass() const
Get the mass directly.
Definition: ParticleBase.hh:80
(with respect to another 4-momentum, vec) greater-than functor
Definition: ParticleBaseUtils.hh:187
(with respect to another 4-momentum, vec) in-range functor
Definition: ParticleBaseUtils.hh:270
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:417
Transverse momentum in-range functor.
Definition: ParticleBaseUtils.hh:50
double Et() const
Get the directly.
Definition: ParticleBase.hh:75
(with respect to another momentum, vec) less-than functor
Definition: ParticleBaseUtils.hh:358
function< bool(const ParticleBase &)> ParticleBaseSelector
std::function instantiation for functors taking a ParticleBase and returning a bool ...
Definition: ParticleBaseUtils.hh:17
double deltaPhi(double phi1, double phi2, bool sign=false)
Calculate the difference between two angles in radians.
Definition: MathUtils.hh:569
double rap() const
Get the directly (alias).
Definition: ParticleBase.hh:96
Transverse momentum greater-than functor.
Definition: ParticleBaseUtils.hh:30
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:429
Rapidity in-range functor.
Definition: ParticleBaseUtils.hh:141
Vector3 pTvec() const
Get the transverse 3-momentum directly.
Definition: ParticleBase.hh:117
Pseudorapidity greater-than functor.
Definition: ParticleBaseUtils.hh:62
Abs rapidity greater-than functor.
Definition: ParticleBaseUtils.hh:152
Vector3 p3() const
Get the 3-momentum directly.
Definition: ParticleBase.hh:108
double pT() const
Get the directly (alias).
Definition: ParticleBase.hh:63
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:463
function< bool(const ParticleBase &, const ParticleBase &)> ParticleBaseSorter
std::function instantiation for functors taking two ParticleBase and returning a bool ...
Definition: ParticleBaseUtils.hh:19
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:404
double deltaEta(double eta1, double eta2)
Definition: MathUtils.hh:577
(with respect to another 4-momentum, vec) less-than functor
Definition: ParticleBaseUtils.hh:202
Base class for particle-like things like Particle and Jet.
Definition: ParticleBase.hh:13
(with respect to another momentum, vec) less-than functor
Definition: ParticleBaseUtils.hh:308
double deltaR(double rap1, double phi1, double rap2, double phi2)
Definition: MathUtils.hh:597
Abs rapidity momentum less-than functor.
Definition: ParticleBaseUtils.hh:162
double absrap() const
Get the directly (alias).
Definition: ParticleBase.hh:100
RapScheme
Enum for rapidity variable to be used in calculating , applying rapidity cuts, etc.
Definition: MathHeader.hh:28
Vector3 vector3() const
Get the spatial part of the 4-vector as a 3-vector.
Definition: Vector4.hh:162
Abs pseudorapidity in-range functor.
Definition: ParticleBaseUtils.hh:111
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:453
Transverse momentum less-than functor.
Definition: ParticleBaseUtils.hh:40
double eta() const
Get the directly (alias).
Definition: ParticleBase.hh:87
Rapidity greater-than functor.
Definition: ParticleBaseUtils.hh:123
(with respect to another 4-momentum, vec) in-range functor
Definition: ParticleBaseUtils.hh:217
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
(with respect to another momentum, vec) less-than functor
Definition: ParticleBaseUtils.hh:256
(with respect to another momentum, vec) greater-than functor
Definition: ParticleBaseUtils.hh:242
Calculator of with respect to a given momentum.
Definition: ParticleBaseUtils.hh:441
Specialized version of the FourVector with momentum/energy functionality.
Definition: Vector4.hh:301
double p() const
Get the 3-momentum magnitude directly.
Definition: ParticleBase.hh:110
double rap() const
Alias for rapidity.
Definition: Vector4.hh:596
double mod() const
Calculate the modulus of a vector. .
Definition: VectorN.hh:95
(with respect to another 4-momentum, vec) in-range functor
Definition: ParticleBaseUtils.hh:322
(with respect to another 4-momentum, vec) in-range functor
Definition: ParticleBaseUtils.hh:370
Rapidity momentum less-than functor.
Definition: ParticleBaseUtils.hh:132