CMS 3D CMS Logo

PuppiCandidate.h
Go to the documentation of this file.
1 #ifndef CommonTools_PileupAlgos_PuppiCandidate
2 #define CommonTools_PileupAlgos_PuppiCandidate
3 
4 #include "fastjet/PseudoJet.hh"
5 
6 // Extension of fastjet::PseudoJet that caches eta and some other info
7 // Puppi uses register to decide between NHs, PV CHs, and PU CHs.
8 class PuppiCandidate : public fastjet::PseudoJet {
9  public:
10  using fastjet::PseudoJet::PseudoJet;
11  double pseudorapidity() const { _ensure_valid_eta(); return _eta; }
12  double eta() const { return pseudorapidity(); }
13  void _ensure_valid_eta() const { if(_eta==fastjet::pseudojet_invalid_rap) _eta = fastjet::PseudoJet::pseudorapidity(); }
15  inline int puppi_register() const { return _puppi_register; }
16  private:
17  // variable names in fastjet style
18  mutable double _eta = fastjet::pseudojet_invalid_rap;
20 };
21 
22 #endif
double pseudorapidity() const
double eta() const
void set_info(int puppi_register)
void _ensure_valid_eta() const
int puppi_register() const