-
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 #46789 from Dr15Jones/allocShiftedJetProducerT
Reduced allocations in ShiftedJetProducerT
- Loading branch information
Showing
5 changed files
with
132 additions
and
115 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
14 changes: 6 additions & 8 deletions
14
CondFormats/JetMETObjects/interface/SimpleJetCorrectionUncertainty.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
#ifndef SimpleJetCorrectionUncertainty_h | ||
#define SimpleJetCorrectionUncertainty_h | ||
|
||
#include "CondFormats/Serialization/interface/Serializable.h" | ||
|
||
#include <string> | ||
#include <vector> | ||
class JetCorrectorParameters; | ||
#include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h" | ||
|
||
class SimpleJetCorrectionUncertainty { | ||
public: | ||
SimpleJetCorrectionUncertainty(); | ||
SimpleJetCorrectionUncertainty() = default; | ||
SimpleJetCorrectionUncertainty(const std::string& fDataFile); | ||
SimpleJetCorrectionUncertainty(const JetCorrectorParameters& fParameters); | ||
SimpleJetCorrectionUncertainty(const SimpleJetCorrectionUncertainty&) = delete; | ||
SimpleJetCorrectionUncertainty& operator=(const SimpleJetCorrectionUncertainty&) = delete; | ||
~SimpleJetCorrectionUncertainty(); | ||
const JetCorrectorParameters& parameters() const { return *mParameters; } | ||
SimpleJetCorrectionUncertainty& operator=(SimpleJetCorrectionUncertainty&&) = default; | ||
~SimpleJetCorrectionUncertainty() = default; | ||
const JetCorrectorParameters& parameters() const { return mParameters; } | ||
float uncertainty(const std::vector<float>& fX, float fY, bool fDirection) const; | ||
|
||
private: | ||
int findBin(const std::vector<float>& v, float x) const; | ||
float uncertaintyBin(unsigned fBin, float fY, bool fDirection) const; | ||
float linearInterpolation(float fZ, const float fX[2], const float fY[2]) const; | ||
JetCorrectorParameters* mParameters; | ||
JetCorrectorParameters mParameters; | ||
}; | ||
|
||
#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
Oops, something went wrong.