-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 #31164 from missirol/devel_112X_puppi_speedup2
improving performance of PuppiProducer
- Loading branch information
Showing
8 changed files
with
117 additions
and
143 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
<use name="FWCore/ParameterSet"/> | ||
<use name="root"/> | ||
<use name="rootcore"/> | ||
<use name="fastjet"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> |
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.