Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
111 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,13 @@ | ||
#ifndef CommonTools_PileupAlgos_PuppiCandidate | ||
#define CommonTools_PileupAlgos_PuppiCandidate | ||
|
||
#include "fastjet/PseudoJet.hh" | ||
|
||
// Extension of fastjet::PseudoJet that caches eta and some other info | ||
// Puppi uses register to decide between NHs, PV CHs, and PU CHs. | ||
class PuppiCandidate : public fastjet::PseudoJet { | ||
public: | ||
using fastjet::PseudoJet::PseudoJet; | ||
double pseudorapidity() const { | ||
_ensure_valid_eta(); | ||
return _eta; | ||
} | ||
double eta() const { return pseudorapidity(); } | ||
void _ensure_valid_eta() const { | ||
if (_eta == fastjet::pseudojet_invalid_rap) | ||
_eta = fastjet::PseudoJet::pseudorapidity(); | ||
} | ||
void set_info(int puppi_register) { _puppi_register = puppi_register; } | ||
inline int puppi_register() const { return _puppi_register; } | ||
|
||
private: | ||
// variable names in fastjet style | ||
mutable double _eta = fastjet::pseudojet_invalid_rap; | ||
int _puppi_register; | ||
#ifndef CommonTools_PileupAlgos_PuppiCandidate_h | ||
#define CommonTools_PileupAlgos_PuppiCandidate_h | ||
|
||
struct PuppiCandidate { | ||
double pt{0}; | ||
double eta{0}; | ||
double phi{0}; | ||
double m{0}; | ||
double rapidity{0}; | ||
int id{0}; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.