39 void energyRegressionAndID(
const std::vector<reco::CaloCluster> &layerClusters,
40 const tensorflow::Session *,
41 std::vector<Trackster> &
result)
const;
42 void printTrackstersDebug(
const std::vector<Trackster> &,
const char *
label)
const;
43 void assignTimeToCandidates(std::vector<TICLCandidate> &resultCandidates)
const;
44 void dumpTrackster(
const Trackster &)
const;
87 static constexpr
int eidNFeatures_ = 3;
96 clusters_token_(consumes<std::
vector<
reco::CaloCluster>>(ps.getParameter<edm::
InputTag>(
"layer_clusters"))),
98 consumes<edm::ValueMap<std::pair<float, float>>>(ps.getParameter<edm::
InputTag>(
"layer_clustersTime"))),
99 tracks_token_(consumes<std::
vector<
reco::Track>>(ps.getParameter<edm::
InputTag>(
"tracks"))),
101 tfDnnLabel_(ps.getParameter<std::
string>(
"tfDnnLabel")),
104 optimiseAcrossTracksters_(ps.getParameter<bool>(
"optimiseAcrossTracksters")),
105 eta_bin_window_(ps.getParameter<int>(
"eta_bin_window")),
106 phi_bin_window_(ps.getParameter<int>(
"phi_bin_window")),
107 pt_sigma_high_(ps.getParameter<double>(
"pt_sigma_high")),
108 pt_sigma_low_(ps.getParameter<double>(
"pt_sigma_low")),
109 halo_max_distance2_(ps.getParameter<double>(
"halo_max_distance2")),
110 track_min_pt_(ps.getParameter<double>(
"track_min_pt")),
111 track_min_eta_(ps.getParameter<double>(
"track_min_eta")),
112 track_max_eta_(ps.getParameter<double>(
"track_max_eta")),
113 track_max_missing_outerhits_(ps.getParameter<int>(
"track_max_missing_outerhits")),
114 cosangle_align_(ps.getParameter<double>(
"cosangle_align")),
115 e_over_h_threshold_(ps.getParameter<double>(
"e_over_h_threshold")),
116 pt_neutral_threshold_(ps.getParameter<double>(
"pt_neutral_threshold")),
117 resol_calo_offset_had_(ps.getParameter<double>(
"resol_calo_offset_had")),
118 resol_calo_scale_had_(ps.getParameter<double>(
"resol_calo_scale_had")),
119 resol_calo_offset_em_(ps.getParameter<double>(
"resol_calo_offset_em")),
120 resol_calo_scale_em_(ps.getParameter<double>(
"resol_calo_scale_em")),
121 debug_(ps.getParameter<bool>(
"debug")),
122 eidInputName_(ps.getParameter<std::
string>(
"eid_input_name")),
123 eidOutputNameEnergy_(ps.getParameter<std::
string>(
"eid_output_name_energy")),
124 eidOutputNameId_(ps.getParameter<std::
string>(
"eid_output_name_id")),
125 eidMinClusterEnergy_(ps.getParameter<double>(
"eid_min_cluster_energy")),
126 eidNLayers_(ps.getParameter<int>(
"eid_n_layers")),
127 eidNClusters_(ps.getParameter<int>(
"eid_n_clusters")),
128 eidSession_(nullptr) {
129 produces<std::vector<Trackster>>();
130 produces<std::vector<TICLCandidate>>();
134 const std::vector<Trackster> &tracksters,
137 for (
auto const &
t : tracksters) {
138 tracksterTile.
fill(tracksterIteration,
t.barycenter().eta(),
t.barycenter().phi(), tracksterId);
139 LogDebug(
"TrackstersMergeProducer") <<
"Adding tracksterId: " << tracksterId <<
" into bin [eta,phi]: [ "
140 << tracksterTile[tracksterIteration].etaBin(
t.barycenter().eta()) <<
", "
141 << tracksterTile[tracksterIteration].phiBin(
t.barycenter().phi())
142 <<
"] for iteration: " << tracksterIteration << std::endl;
149 auto e_over_h = (t.raw_em_pt() / ((t.raw_pt() - t.raw_em_pt()) != 0. ? (t.raw_pt() - t.raw_em_pt()) : 1.));
151 <<
"\nTrackster raw_pt: " << t.raw_pt() <<
" raw_em_pt: " << t.raw_em_pt() <<
" eoh: " << e_over_h
152 <<
" barycenter: " << t.barycenter() <<
" eta,phi (baricenter): " << t.barycenter().eta() <<
", "
153 << t.barycenter().phi() <<
" eta,phi (eigen): " << t.eigenvectors(0).eta() <<
", " << t.eigenvectors(0).phi()
154 <<
" pt(eigen): " <<
std::sqrt(t.eigenvectors(0).Unit().perp2()) * t.raw_energy() <<
" seedID: " << t.seedID()
155 <<
" seedIndex: " << t.seedIndex() <<
" size: " << t.vertices().size() <<
" average usage: "
156 << (std::accumulate(
std::begin(t.vertex_multiplicity()),
std::end(t.vertex_multiplicity()), 0.) /
157 (float)t.vertex_multiplicity().size())
158 <<
" raw_energy: " << t.raw_energy() <<
" regressed energy: " << t.regressed_energy()
159 <<
" probs(ga/e/mu/np/cp/nh/am/unk): ";
160 for (
auto const &
p : t.id_probabilities()) {
161 LogDebug(
"TrackstersMergeProducer") << std::fixed <<
p <<
" ";
163 LogDebug(
"TrackstersMergeProducer") <<
" sigmas: ";
164 for (
auto const &
s : t.sigmas()) {
165 LogDebug(
"TrackstersMergeProducer") <<
s <<
" ";
167 LogDebug(
"TrackstersMergeProducer") << std::endl;
173 auto resultTrackstersMerged = std::make_unique<std::vector<Trackster>>();
174 auto resultCandidates = std::make_unique<std::vector<TICLCandidate>>();
179 std::vector<bool> usedTrackstersMerged;
180 std::vector<int> indexInMergedCollTRKEM;
181 std::vector<int> indexInMergedCollEM;
182 std::vector<int> indexInMergedCollTRK;
183 std::vector<int> indexInMergedCollHAD;
184 std::vector<bool> usedSeeds;
187 std::map<int, std::vector<std::pair<int, TracksterIterIndex>>> seedToTracksterAssociator;
190 const auto &
tracks = *track_h;
194 const auto &layerClusters = *cluster_h;
198 const auto &layerClustersTimes = *clustersTime_h;
202 const auto &trackstersEM = *trackstersem_h;
206 const auto &trackstersTRKEM = *tracksterstrkem_h;
210 const auto &trackstersTRK = *tracksterstrk_h;
214 const auto &trackstersHAD = *trackstershad_h;
218 const auto &seedingTrk = *seedingTrk_h;
219 usedSeeds.resize(
tracks.size(),
false);
221 fillTile(tracksterTile, trackstersTRKEM, TracksterIterIndex::TRKEM);
222 fillTile(tracksterTile, trackstersEM, TracksterIterIndex::EM);
223 fillTile(tracksterTile, trackstersTRK, TracksterIterIndex::TRKHAD);
224 fillTile(tracksterTile, trackstersHAD, TracksterIterIndex::HAD);
226 auto totalNumberOfTracksters =
227 trackstersTRKEM.size() + trackstersTRK.size() + trackstersEM.size() + trackstersHAD.size();
228 resultTrackstersMerged->reserve(totalNumberOfTracksters);
229 usedTrackstersMerged.resize(totalNumberOfTracksters,
false);
230 indexInMergedCollTRKEM.reserve(trackstersTRKEM.size());
231 indexInMergedCollEM.reserve(trackstersEM.size());
232 indexInMergedCollTRK.reserve(trackstersTRK.size());
233 indexInMergedCollHAD.reserve(trackstersHAD.size());
242 for (
auto const &
t : trackstersTRKEM) {
243 indexInMergedCollTRKEM.push_back(resultTrackstersMerged->size());
244 seedToTracksterAssociator[
t.seedIndex()].emplace_back(resultTrackstersMerged->size(), TracksterIterIndex::TRKEM);
245 resultTrackstersMerged->push_back(
t);
248 for (
auto const &
t : trackstersEM) {
249 indexInMergedCollEM.push_back(resultTrackstersMerged->size());
250 resultTrackstersMerged->push_back(
t);
253 for (
auto const &
t : trackstersTRK) {
254 indexInMergedCollTRK.push_back(resultTrackstersMerged->size());
255 seedToTracksterAssociator[
t.seedIndex()].emplace_back(resultTrackstersMerged->size(), TracksterIterIndex::TRKHAD);
256 resultTrackstersMerged->push_back(
t);
259 for (
auto const &
t : trackstersHAD) {
260 indexInMergedCollHAD.push_back(resultTrackstersMerged->size());
261 resultTrackstersMerged->push_back(
t);
272 auto trackstersMergedHandle = evt.
put(
std::move(resultTrackstersMerged));
278 for (
unsigned i = 0;
i < trackstersEM.size(); ++
i) {
279 auto mergedIdx = indexInMergedCollEM[
i];
280 usedTrackstersMerged[mergedIdx] =
true;
281 const auto &
t = trackstersEM[
i];
288 t.raw_energy() *
t.barycenter().unit().y(),
289 t.raw_energy() *
t.barycenter().unit().z(),
291 tmpCandidate.
setP4(p4);
292 resultCandidates->push_back(tmpCandidate);
296 constexpr
double mpion = 0.13957;
297 constexpr
float mpion2 = mpion * mpion;
298 for (
unsigned i = 0;
i < trackstersHAD.size(); ++
i) {
299 auto mergedIdx = indexInMergedCollHAD[
i];
300 usedTrackstersMerged[mergedIdx] =
true;
301 const auto &
t = trackstersHAD[
i];
307 float momentum =
std::sqrt(
t.raw_energy() *
t.raw_energy() - mpion2);
309 momentum *
t.barycenter().unit().y(),
310 momentum *
t.barycenter().unit().z(),
312 tmpCandidate.
setP4(p4);
313 resultCandidates->push_back(tmpCandidate);
317 for (
unsigned i = 0;
i < trackstersTRKEM.size(); ++
i) {
318 auto mergedIdx = indexInMergedCollTRKEM[
i];
319 if (!usedTrackstersMerged[mergedIdx]) {
320 const auto &
t = trackstersTRKEM[
i];
321 auto trackIdx =
t.seedIndex();
323 if (!usedSeeds[trackIdx] and
t.raw_energy() > 0) {
324 usedSeeds[trackIdx] =
true;
325 usedTrackstersMerged[mergedIdx] =
true;
327 std::vector<int> trackstersTRKwithSameSeed;
328 std::vector<int> trackstersTRKEMwithSameSeed;
330 for (
const auto &tracksterIterationPair : seedToTracksterAssociator[trackIdx]) {
331 if (tracksterIterationPair.first != mergedIdx and !usedTrackstersMerged[tracksterIterationPair.first] and
332 trackstersMergedHandle->at(tracksterIterationPair.first).raw_energy() > 0.) {
333 if (tracksterIterationPair.second == TracksterIterIndex::TRKEM) {
334 trackstersTRKEMwithSameSeed.push_back(tracksterIterationPair.first);
335 }
else if (tracksterIterationPair.second == TracksterIterIndex::TRKHAD) {
336 trackstersTRKwithSameSeed.push_back(tracksterIterationPair.first);
341 float tracksterTotalRawPt =
t.raw_pt();
342 std::vector<int> haloTrackstersTRKIdx;
343 bool foundCompatibleTRK =
false;
345 for (
auto otherTracksterIdx : trackstersTRKwithSameSeed) {
346 usedTrackstersMerged[otherTracksterIdx] =
true;
347 tracksterTotalRawPt += trackstersMergedHandle->at(otherTracksterIdx).raw_pt();
350 if ((
t.barycenter() - trackstersMergedHandle->at(otherTracksterIdx).barycenter()).
mag2() <
352 haloTrackstersTRKIdx.push_back(otherTracksterIdx);
355 foundCompatibleTRK =
true;
360 if (trackstersTRKEMwithSameSeed.empty()) {
361 if (foundCompatibleTRK) {
364 double raw_energy =
t.raw_energy();
369 for (
auto otherTracksterIdx : trackstersTRKwithSameSeed) {
371 raw_energy += trackstersMergedHandle->at(otherTracksterIdx).raw_energy();
375 raw_energy *
track.momentum().unit().y(),
376 raw_energy *
track.momentum().unit().z(),
378 tmpCandidate.
setP4(p4);
379 resultCandidates->push_back(tmpCandidate);
384 double raw_energy =
t.raw_energy();
387 for (
auto otherTracksterIdx : trackstersTRKwithSameSeed) {
389 raw_energy += trackstersMergedHandle->at(otherTracksterIdx).raw_energy();
395 raw_energy *
track.momentum().unit().y(),
396 raw_energy *
track.momentum().unit().z(),
398 tmpCandidate.
setP4(p4);
399 resultCandidates->push_back(tmpCandidate);
404 int closestTrackster = mergedIdx;
406 for (
auto otherTracksterIdx : trackstersTRKEMwithSameSeed) {
407 auto thisPt = tracksterTotalRawPt + trackstersMergedHandle->at(otherTracksterIdx).raw_pt() -
t.raw_pt();
408 closestTrackster =
std::abs(thisPt -
track.pt()) < minPtDiff ? otherTracksterIdx : closestTrackster;
410 usedTrackstersMerged[closestTrackster] =
true;
412 if (foundCompatibleTRK) {
415 double raw_energy = trackstersMergedHandle->at(closestTrackster).raw_energy();
420 for (
auto otherTracksterIdx : trackstersTRKwithSameSeed) {
422 raw_energy += trackstersMergedHandle->at(otherTracksterIdx).raw_energy();
425 float momentum =
std::sqrt(raw_energy * raw_energy - mpion2);
427 momentum *
track.momentum().unit().y(),
428 momentum *
track.momentum().unit().z(),
430 tmpCandidate.
setP4(p4);
431 resultCandidates->push_back(tmpCandidate);
436 double raw_energy = trackstersMergedHandle->at(closestTrackster).raw_energy();
440 for (
auto otherTracksterIdx : trackstersTRKwithSameSeed) {
442 raw_energy += trackstersMergedHandle->at(otherTracksterIdx).raw_energy();
447 raw_energy *
track.momentum().unit().y(),
448 raw_energy *
track.momentum().unit().z(),
450 tmpCandidate.
setP4(p4);
451 resultCandidates->push_back(tmpCandidate);
454 for (
auto otherTracksterIdx : trackstersTRKEMwithSameSeed) {
455 auto tmpIndex = (otherTracksterIdx != closestTrackster) ? otherTracksterIdx : mergedIdx;
457 const auto &otherTrackster = trackstersMergedHandle->at(tmpIndex);
458 auto gammaEnergy = otherTrackster.raw_energy();
463 gammaEnergy * otherTrackster.barycenter().unit().y(),
464 gammaEnergy * otherTrackster.barycenter().unit().z(),
466 photonCandidate.
setP4(gammaP4);
468 resultCandidates->push_back(photonCandidate);
475 for (
unsigned i = 0;
i < trackstersTRK.size(); ++
i) {
476 auto mergedIdx = indexInMergedCollTRK[
i];
477 const auto &
t = trackstersTRK[
i];
479 if (!usedTrackstersMerged[mergedIdx] and
t.raw_energy() > 0) {
480 auto trackIdx =
t.seedIndex();
482 if (!usedSeeds[trackIdx]) {
483 usedSeeds[trackIdx] =
true;
484 usedTrackstersMerged[mergedIdx] =
true;
491 float momentum =
std::sqrt(
t.raw_energy() *
t.raw_energy() - mpion2);
493 momentum *
track.momentum().unit().y(),
494 momentum *
track.momentum().unit().z(),
496 tmpCandidate.
setP4(p4);
497 resultCandidates->push_back(tmpCandidate);
502 for (
auto const &
s : seedingTrk) {
503 if (usedSeeds[
s.index] ==
false) {
513 tmpCandidate.
setP4(p4Polar);
514 resultCandidates->push_back(tmpCandidate);
515 usedSeeds[
s.index] =
true;
520 for (
unsigned i = 0;
i <
tracks.size(); ++
i) {
533 tmpCandidate.
setP4(p4Polar);
534 resultCandidates->push_back(tmpCandidate);
546 const tensorflow::Session *eidSession,
547 std::vector<Trackster> &tracksters)
const {
571 std::vector<int> tracksterIndices;
572 for (
int i = 0;
i < (int)tracksters.size();
i++) {
577 float sumClusterEnergy = 0.;
578 for (
const unsigned int &vertex : tracksters[
i].
vertices()) {
579 sumClusterEnergy += (float)layerClusters[vertex].
energy();
583 tracksters[
i].setRegressedEnergy(0.
f);
584 tracksters[
i].zeroProbabilities();
585 tracksterIndices.push_back(
i);
592 int batchSize = (int)tracksterIndices.size();
593 if (batchSize == 0) {
599 tensorflow::Tensor
input(tensorflow::DT_FLOAT, shape);
601 static constexpr
int inputDimension = 4;
603 std::vector<tensorflow::Tensor> outputs;
604 std::vector<std::string> outputNames;
613 for (
int i = 0;
i < batchSize;
i++) {
614 const Trackster &trackster = tracksters[tracksterIndices[
i]];
620 std::vector<int> clusterIndices(trackster.vertices().size());
621 for (
int k = 0;
k < (int)trackster.vertices().size();
k++) {
622 clusterIndices[
k] =
k;
624 sort(clusterIndices.begin(), clusterIndices.end(), [&layerClusters, &trackster](
const int &
a,
const int &
b) {
625 return layerClusters[trackster.vertices(a)].energy() > layerClusters[trackster.vertices(
b)].energy();
632 for (
const int &
k : clusterIndices) {
638 float *
features = &input.tensor<float, inputDimension>()(
i, j, seenClusters[j], 0);
641 *(features++) =
float(cluster.
energy() / float(trackster.vertex_multiplicity(
k)));
653 float *
features = &input.tensor<float, inputDimension>()(
i,
j,
k, 0);
662 tensorflow::run(const_cast<tensorflow::Session *>(eidSession), inputList, outputNames, &outputs);
667 float *
energy = outputs[0].flat<
float>().
data();
669 for (
const int &
i : tracksterIndices) {
670 tracksters[
i].setRegressedEnergy(*(energy++));
678 float *probs = outputs[probsIdx].flat<
float>().
data();
680 for (
const int &
i : tracksterIndices) {
681 tracksters[
i].setProbabilities(probs);
682 probs += tracksters[
i].id_probabilities().size();
688 for (
auto &cand : resultCandidates) {
689 if (cand.tracksters().size() > 1) {
692 for (
const auto &tr : cand.tracksters()) {
693 if (tr->timeError() > 0) {
694 auto invTimeESq =
pow(tr->timeError(), -2);
695 time += tr->time() * invTimeESq;
696 timeErr += invTimeESq;
700 timeErr = 1. / timeErr;
702 cand.setTime(time * timeErr);
703 cand.setTimeError(
sqrt(timeErr));
714 for (
auto const &
t : tracksters) {
716 << counter++ <<
" TrackstersMergeProducer (" << label <<
") obj barycenter: " <<
t.barycenter()
717 <<
" eta,phi (baricenter): " <<
t.barycenter().eta() <<
", " <<
t.barycenter().phi()
718 <<
" eta,phi (eigen): " <<
t.eigenvectors(0).eta() <<
", " <<
t.eigenvectors(0).phi()
719 <<
" pt(eigen): " <<
std::sqrt(
t.eigenvectors(0).Unit().perp2()) *
t.raw_energy() <<
" seedID: " <<
t.seedID()
720 <<
" seedIndex: " <<
t.seedIndex() <<
" size: " <<
t.vertices().size() <<
" average usage: "
721 << (std::accumulate(
std::begin(
t.vertex_multiplicity()),
std::end(
t.vertex_multiplicity()), 0.) /
722 (float)
t.vertex_multiplicity().size())
723 <<
" raw_energy: " <<
t.raw_energy() <<
" regressed energy: " <<
t.regressed_energy()
724 <<
" probs(ga/e/mu/np/cp/nh/am/unk): ";
725 for (
auto const &
p :
t.id_probabilities()) {
726 LogDebug(
"TrackstersMergeProducer") << std::fixed <<
p <<
" ";
728 LogDebug(
"TrackstersMergeProducer") <<
" sigmas: ";
729 for (
auto const &
s :
t.sigmas()) {
730 LogDebug(
"TrackstersMergeProducer") <<
s <<
" ";
732 LogDebug(
"TrackstersMergeProducer") << std::endl;
746 desc.
add<
bool>(
"optimiseAcrossTracksters",
true);
747 desc.
add<
int>(
"eta_bin_window", 1);
748 desc.
add<
int>(
"phi_bin_window", 1);
749 desc.
add<
double>(
"pt_sigma_high", 2.);
750 desc.
add<
double>(
"pt_sigma_low", 2.);
751 desc.
add<
double>(
"halo_max_distance2", 4.);
752 desc.
add<
double>(
"track_min_pt", 1.);
753 desc.
add<
double>(
"track_min_eta", 1.48);
754 desc.
add<
double>(
"track_max_eta", 3.);
755 desc.
add<
int>(
"track_max_missing_outerhits", 5);
756 desc.
add<
double>(
"cosangle_align", 0.9945);
757 desc.
add<
double>(
"e_over_h_threshold", 1.);
758 desc.
add<
double>(
"pt_neutral_threshold", 2.);
759 desc.
add<
double>(
"resol_calo_offset_had", 1.5);
760 desc.
add<
double>(
"resol_calo_scale_had", 0.15);
761 desc.
add<
double>(
"resol_calo_offset_em", 1.5);
762 desc.
add<
double>(
"resol_calo_scale_em", 0.15);
763 desc.
add<
bool>(
"debug",
true);
766 desc.
add<
std::string>(
"eid_output_name_energy",
"output/regressed_energy");
767 desc.
add<
std::string>(
"eid_output_name_id",
"output/id_probabilities");
768 desc.
add<
double>(
"eid_min_cluster_energy", 1.);
769 desc.
add<
int>(
"eid_n_layers", 50);
770 desc.
add<
int>(
"eid_n_clusters", 10);
771 descriptions.
add(
"trackstersMergeProducer", desc);
ticl::Trackster::IterationIndex TracksterIterIndex
std::vector< NamedTensor > NamedTensorList
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< std::vector< Trackster > > trackstersem_token_
void fillTile(TICLTracksterTiles &, const std::vector< Trackster > &, TracksterIterIndex)
const double cosangle_align_
tensorflow::Session * eidSession_
const edm::EDGetTokenT< std::vector< TICLSeedingRegion > > seedingTrk_token_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const double halo_max_distance2_
#define DEFINE_FWK_MODULE(type)
void assignTimeToCandidates(std::vector< TICLCandidate > &resultCandidates) const
const tensorflow::Session * tfSession_
void produce(edm::Event &, const edm::EventSetup &) override
hgcal::RecHitTools rhtools_
auto const & tracks
cannot be loose
const edm::EDGetTokenT< std::vector< Trackster > > tracksterstrkem_token_
const edm::EDGetTokenT< std::vector< reco::CaloCluster > > clusters_token_
const double track_min_eta_
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometry_token_
void dumpTrackster(const Trackster &) const
double eta() const
pseudorapidity of cluster centroid
static std::string const input
bool getData(T &iHolder) const
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, const edm::ValueMap< std::pair< float, float >> &, double, bool energyWeight=true)
const float eidMinClusterEnergy_
void setCharge(Charge q) final
set electric charge
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const std::string eidOutputNameId_
const double pt_sigma_low_
static constexpr int eidNFeatures_
const double pt_neutral_threshold_
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
const edm::EDGetTokenT< std::vector< Trackster > > tracksterstrk_token_
void setRawEnergy(float rawEnergy)
std::vector< float > features(const reco::PreId &ecal, const reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
const double e_over_h_threshold_
const double resol_calo_scale_had_
const bool optimiseAcrossTracksters_
const int phi_bin_window_
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< std::vector< Trackster > > trackstershad_token_
double energy() const
cluster energy
const double resol_calo_offset_em_
~TrackstersMergeProducer() override
void energyRegressionAndID(const std::vector< reco::CaloCluster > &layerClusters, const tensorflow::Session *, std::vector< Trackster > &result) const
const edm::EDGetTokenT< edm::ValueMap< std::pair< float, float > > > clustersTime_token_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const int track_max_missing_outerhits_
const std::string tfDnnLabel_
const edm::EDGetTokenT< std::vector< reco::Track > > tracks_token_
const std::string eidOutputNameEnergy_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string eidInputName_
TrackstersMergeProducer(const edm::ParameterSet &ps)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const double pt_sigma_high_
const double track_max_eta_
const double resol_calo_offset_had_
char data[epos_bytes_allocation]
void addTrackster(const edm::Ptr< ticl::Trackster > &trackster)
static std::atomic< unsigned int > counter
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void fill(int index, double eta, double phi, unsigned int objectId)
const double track_min_pt_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
double phi() const
azimuthal angle of cluster centroid
void printTrackstersDebug(const std::vector< Trackster > &, const char *label) const
void setPdgId(int pdgId) final
const double resol_calo_scale_em_
void setTrackPtr(const edm::Ptr< reco::Track > &trackPtr)
void setP4(const LorentzVector &p4) final
set 4-momentum
Power< A, B >::type pow(const A &a, const B &b)
const edm::ESGetToken< TfGraphDefWrapper, TfGraphRecord > tfDnnToken_
const int eta_bin_window_