L1Trigger
Phase2L1ParticleFlow
interface
TauNNId.h
Go to the documentation of this file.
1
#ifndef L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
2
#define L1TRIGGER_PHASE2L1PARTICLEFLOWS_TAUNNID_H
3
4
#include <string>
5
#include "
PhysicsTools/TensorFlow/interface/TensorFlow.h
"
6
#include "
DataFormats/L1TParticleFlow/interface/PFCandidate.h
"
7
8
struct
TauNNTFCache
{
9
TauNNTFCache
() :
graphDef
(nullptr) {}
10
std::atomic<tensorflow::GraphDef *>
graphDef
;
11
};
12
13
class
TauNNId
{
14
public
:
15
TauNNId
(
const
std::string
&iInput,
const
TauNNTFCache
*
cache
,
const
std::string
&iWeightFile,
int
iNParticles);
16
~TauNNId
();
17
18
void
setNNVectorVar
();
19
float
EvaluateNN
();
20
float
compute
(
const
l1t::PFCandidate
&iSeed,
l1t::PFCandidateCollection
&iParts);
21
22
private
:
23
tensorflow::Session *
session_
;
24
std::vector<float>
NNvectorVar_
;
25
std::string
fInput_
;
26
int
fNParticles_
;
27
unique_ptr<float[]>
fPt_
;
28
unique_ptr<float[]>
fEta_
;
29
unique_ptr<float[]>
fPhi_
;
30
unique_ptr<float[]>
fId_
;
31
};
32
#endif
PFCandidate.h
TensorFlow.h
TauNNTFCache::TauNNTFCache
TauNNTFCache()
Definition:
TauNNId.h:9
TauNNId::setNNVectorVar
void setNNVectorVar()
Definition:
TauNNId.cc:22
TauNNId::fEta_
unique_ptr< float[]> fEta_
Definition:
TauNNId.h:28
TauNNId::fInput_
std::string fInput_
Definition:
TauNNId.h:25
TauNNTFCache
Definition:
TauNNId.h:8
TauNNId::fPhi_
unique_ptr< float[]> fPhi_
Definition:
TauNNId.h:29
utilities.cache
def cache(function)
Definition:
utilities.py:3
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
TauNNId
Definition:
TauNNId.h:13
TauNNId::TauNNId
TauNNId(const std::string &iInput, const TauNNTFCache *cache, const std::string &iWeightFile, int iNParticles)
Definition:
TauNNId.cc:8
TauNNId::fId_
unique_ptr< float[]> fId_
Definition:
TauNNId.h:30
l1t::PFCandidateCollection
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition:
PFCandidate.h:57
TauNNId::session_
tensorflow::Session * session_
Definition:
TauNNId.h:23
l1t::PFCandidate
Definition:
PFCandidate.h:12
TauNNId::compute
float compute(const l1t::PFCandidate &iSeed, l1t::PFCandidateCollection &iParts)
Definition:
TauNNId.cc:51
TauNNId::~TauNNId
~TauNNId()
Definition:
TauNNId.cc:21
TauNNTFCache::graphDef
std::atomic< tensorflow::GraphDef * > graphDef
Definition:
TauNNId.h:10
TauNNId::fPt_
unique_ptr< float[]> fPt_
Definition:
TauNNId.h:27
TauNNId::fNParticles_
int fNParticles_
Definition:
TauNNId.h:26
TauNNId::NNvectorVar_
std::vector< float > NNvectorVar_
Definition:
TauNNId.h:24
TauNNId::EvaluateNN
float EvaluateNN()
Definition:
TauNNId.cc:40
Generated for CMSSW Reference Manual by
1.8.16