-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23271 from kpedro88/SpeedupPuppi948
Speedup puppi [94X]
- Loading branch information
Showing
7 changed files
with
55 additions
and
70 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#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; | ||
}; | ||
|
||
#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 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "CommonTools/PileupAlgos/interface/PuppiCandidate.h" |
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