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 #31290 from missirol/devel_106X_puppi_speedup5
[10_6_X] improving performance of PuppiProducer
- Loading branch information
Showing
6 changed files
with
122 additions
and
103 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,22 +1,18 @@ | ||
#ifndef CommonTools_PileupAlgos_PuppiCandidate | ||
#define CommonTools_PileupAlgos_PuppiCandidate | ||
#ifndef CommonTools_PileupAlgos_PuppiCandidate_h | ||
#define CommonTools_PileupAlgos_PuppiCandidate_h | ||
|
||
#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; | ||
struct PuppiCandidate { | ||
double pt{0}; | ||
double eta{0}; | ||
double phi{0}; | ||
double m{0}; | ||
double rapidity{0}; | ||
double px{0}; | ||
double py{0}; | ||
double pz{0}; | ||
double e{0}; | ||
int id{0}; | ||
int puppi_register{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 was deleted.
Oops, something went wrong.
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