forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 2
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 cms-sw#1063 from gpetruc/update_correlator_v1.14_r…
…ebased Update Correlator code to l1ct-123x-v1.14, rebased
- Loading branch information
Showing
50 changed files
with
2,416 additions
and
358 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
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
Binary file not shown.
Binary file added
BIN
+12.4 KB
L1Trigger/Phase2L1ParticleFlow/data/modelTT_PUP_Off_dXY_XYCut_Graph.pb
Binary file not shown.
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,42 @@ | ||
#ifndef L1TRIGGER_PHASE2L1PARTICLEFLOWS_BJETID_H | ||
#define L1TRIGGER_PHASE2L1PARTICLEFLOWS_BJETID_H | ||
|
||
#include <string> | ||
#include "PhysicsTools/TensorFlow/interface/TensorFlow.h" | ||
#include "DataFormats/L1TParticleFlow/interface/PFCandidate.h" | ||
#include "DataFormats/L1TParticleFlow/interface/PFJet.h" | ||
|
||
struct BJetTFCache { | ||
BJetTFCache(const std::string &graphPath) : graphDef(tensorflow::loadGraphDef(graphPath)) {} | ||
std::unique_ptr<tensorflow::GraphDef> graphDef; | ||
}; | ||
|
||
class BJetId { | ||
public: | ||
BJetId(const std::string &iInput, | ||
const std::string &iOutput, | ||
const BJetTFCache *cache, | ||
const std::string &iWeightFile, | ||
int iNParticles); | ||
~BJetId(); | ||
|
||
void setNNVectorVar(); | ||
float EvaluateNN(); | ||
float compute(const l1t::PFJet &iJet, float vz, bool useRawPt); | ||
|
||
private: | ||
tensorflow::Session *session_; | ||
std::vector<float> NNvectorVar_; | ||
std::string fInput_; | ||
std::string fOutput_; | ||
int fNParticles_; | ||
unique_ptr<float[]> fPt_; | ||
unique_ptr<float[]> fEta_; | ||
unique_ptr<float[]> fPhi_; | ||
unique_ptr<float[]> fId_; | ||
unique_ptr<int[]> fCharge_; | ||
unique_ptr<float[]> fDZ_; | ||
unique_ptr<float[]> fDX_; | ||
unique_ptr<float[]> fDY_; | ||
}; | ||
#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
Oops, something went wrong.