Skip to content

Commit 7bacdc4

Browse files
committed
Updating code to work with latest models, adding defaults to run on the correlator test bench, and adding missing consts
1 parent 3d01061 commit 7bacdc4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

L1Trigger/L1TTrackMatch/plugins/L1TrackVertexAssociationProducer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class L1TrackVertexAssociationProducer : public edm::global::EDProducer<> {
204204
inputAssoc.tensor<float, 2>()(0, 3) = dZEmulation_rescale.to_double();
205205

206206
// Run Association Network:
207-
tensorflow::run(AssociationSesh_, {{"assoc:0", inputAssoc}}, {"Identity:0"}, &outputAssoc);
207+
tensorflow::run(AssociationSesh_, {{"NNvtx_track_association:0", inputAssoc}}, {"Identity:0"}, &outputAssoc);
208208

209209
double NNOutput = (double)outputAssoc[0].tensor<float, 2>()(0, 0);
210210

L1Trigger/Phase2L1ParticleFlow/interface/NNVtxAssoc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class NNVtxAssoc {
3232
static edm::ParameterSetDescription getParameterSetDescription();
3333

3434
template <typename T>
35-
bool TTTrackNetworkSelector(const PFRegionEmu& region, T& t, const l1ct::PVObjEmu& v);
35+
bool TTTrackNetworkSelector(const PFRegionEmu& region, const T& t, const l1ct::PVObjEmu& v);
3636

3737
private:
3838
tensorflow::Session* associationSesh_;

L1Trigger/Phase2L1ParticleFlow/interface/puppi/linpuppi_ref.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ namespace l1ct {
4242
double priorNe,
4343
double priorPh,
4444
pt_t ptCut,
45-
bool useMLAssociation,
46-
const double associationThreshold,
47-
std::string associationGraphPath,
48-
std::vector<double> associationNetworkZ0binning,
49-
std::vector<double> associationNetworkEtaBounds,
50-
std::vector<double> associationNetworkZ0ResBins,
45+
bool useMLAssociation = false,
46+
const double associationThreshold = 0.0,
47+
std::string associationGraphPath = "",
48+
std::vector<double> associationNetworkZ0binning = {},
49+
std::vector<double> associationNetworkEtaBounds = {},
50+
std::vector<double> associationNetworkZ0ResBins = {},
5151
unsigned int nFinalSort = 0,
5252
SortAlgo finalSortAlgo = SortAlgo::Insertion)
5353
: nTrack_(nTrack),

L1Trigger/Phase2L1ParticleFlow/src/NNVtxAssoc.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ NNVtxAssoc::NNVtxAssoc(std::string AssociationGraphPath,
2626
}
2727

2828
template <typename T>
29-
bool NNVtxAssoc::TTTrackNetworkSelector(const PFRegionEmu& region, T& t, const l1ct::PVObjEmu& v) {
29+
bool NNVtxAssoc::TTTrackNetworkSelector(const PFRegionEmu& region, const T& t, const l1ct::PVObjEmu& v) {
3030
tensorflow::Tensor inputAssoc(tensorflow::DT_FLOAT, {1, 4});
3131
std::vector<tensorflow::Tensor> outputAssoc;
3232

L1Trigger/VertexFinder/src/VertexFinder.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ namespace l1tVertexFinder {
11141114

11151115
// CNN output: track weight
11161116
std::vector<tensorflow::Tensor> outputTrkWeight;
1117-
tensorflow::run(TrackWeightSesh, {{"weight:0", inputTrkWeight}}, {"Identity:0"}, &outputTrkWeight);
1117+
tensorflow::run(TrackWeightSesh, {{"NNvtx_input_track_weight:0", inputTrkWeight}}, {"Identity:0"}, &outputTrkWeight);
11181118
// Set track weight pack into tracks:
11191119

11201120
ap_ufixed<16, 5> NNOutput;
@@ -1165,7 +1165,7 @@ namespace l1tVertexFinder {
11651165
}
11661166

11671167
// Run PV Network:
1168-
tensorflow::run(PatternRecSesh, {{"hist:0", inputPV}}, {"Identity:0"}, &outputPV);
1168+
tensorflow::run(PatternRecSesh, {{"NNvtx_histogram:0", inputPV}}, {"Identity:0"}, &outputPV);
11691169
// Threshold needed due to rounding differences in internal CNN layer emulation versus firmware
11701170
const float histogrammingThreshold_ = 0.0;
11711171
for (int i(0); i < settings_->vx_histogram_numbins(); ++i) {

0 commit comments

Comments
 (0)