|
|
#include <PatternRecognitionbyCLUE3D.h>
|
void | energyRegressionAndID (const std::vector< reco::CaloCluster > &layerClusters, std::vector< Trackster > &result) |
|
void | makeTracksters (const typename PatternRecognitionAlgoBaseT< TILES >::Inputs &input, std::vector< Trackster > &result, std::unordered_map< int, std::vector< int >> &seedToTracksterAssociation) override |
|
| PatternRecognitionbyCLUE3D (const edm::ParameterSet &conf, const CacheBase *cache, edm::ConsumesCollector) |
|
| ~PatternRecognitionbyCLUE3D () override=default |
|
virtual void | makeTracksters (const Inputs &input, std::vector< Trackster > &result, std::unordered_map< int, std::vector< int >> &seedToTracksterAssociation)=0 |
|
| PatternRecognitionAlgoBaseT (const edm::ParameterSet &conf, const CacheBase *cache, edm::ConsumesCollector) |
|
virtual | ~PatternRecognitionAlgoBaseT () |
|
|
void | calculateDistanceToHigher (const TILES &, const unsigned int layerId, const std::vector< std::pair< int, int >> &) |
|
void | calculateLocalDensity (const TILES &, const unsigned int layerId, const std::vector< std::pair< int, int >> &) |
|
void | dumpClusters (const std::vector< std::pair< int, int >> &layerIdx2layerandSoa, const int) const |
|
void | dumpTiles (const TILES &) const |
|
void | dumpTracksters (const std::vector< std::pair< int, int >> &layerIdx2layerandSoa, const int, const std::vector< Trackster > &) const |
|
int | findAndAssignTracksters (const TILES &, const std::vector< std::pair< int, int >> &) |
|
void | reset () |
|
template<typename TILES>
class ticl::PatternRecognitionbyCLUE3D< TILES >
Definition at line 12 of file PatternRecognitionbyCLUE3D.h.
◆ PatternRecognitionbyCLUE3D()
template<typename TILES >
◆ ~PatternRecognitionbyCLUE3D()
template<typename TILES >
◆ calculateDistanceToHigher()
template<typename TILES >
void PatternRecognitionbyCLUE3D::calculateDistanceToHigher |
( |
const TILES & |
tiles, |
|
|
const unsigned int |
layerId, |
|
|
const std::vector< std::pair< int, int >> & |
layerIdx2layerandSoa |
|
) |
| |
|
private |
Definition at line 563 of file PatternRecognitionbyCLUE3D.cc.
565 int type = tiles[0].typeT();
568 auto &clustersOnLayer =
clusters_[layerId];
569 unsigned int numberOfClusters = clustersOnLayer.x.size();
571 for (
unsigned int i = 0;
i < numberOfClusters;
i++) {
574 <<
"Starting searching nearestHigher on " << layerId <<
" with rho: " << clustersOnLayer.rho[
i]
575 <<
" at eta, phi: " << tiles[layerId].etaBin(clustersOnLayer.eta[
i]) <<
", "
576 << tiles[layerId].etaBin(clustersOnLayer.phi[
i]);
581 unsigned int maxLayer = 2 * lastLayerPerSide - 1;
582 if (layerId < lastLayerPerSide) {
591 std::pair<int, int> i_nearestHigher(-1, -1);
592 for (
unsigned int currentLayer =
minLayer; currentLayer <= maxLayer; currentLayer++) {
593 const auto &tileOnLayer = tiles[currentLayer];
596 int etaBinMin =
std::max(tileOnLayer.etaBin(clustersOnLayer.eta[
i]) - etaWindow, 0);
597 int etaBinMax =
std::min(tileOnLayer.etaBin(clustersOnLayer.eta[
i]) + etaWindow, nEtaBin);
598 int phiBinMin = tileOnLayer.phiBin(clustersOnLayer.phi[
i]) -
phiWindow;
599 int phiBinMax = tileOnLayer.phiBin(clustersOnLayer.phi[
i]) +
phiWindow;
602 for (
int iphi_it = phiBinMin; iphi_it <= phiBinMax; ++iphi_it) {
603 int iphi = ((iphi_it % nPhiBin + nPhiBin) % nPhiBin);
606 <<
"Searching nearestHigher on " << currentLayer <<
" eta, phi: " <<
ieta <<
", " << iphi_it;
608 for (
auto otherClusterIdx : tileOnLayer[
offset +
iphi]) {
609 auto const &layerandSoa = layerIdx2layerandSoa[otherClusterIdx];
611 if ((layerandSoa.first == -1) && (layerandSoa.second == -1))
613 auto const &clustersOnOtherLayer =
clusters_[layerandSoa.first];
615 clustersOnLayer.phi[
i],
616 clustersOnOtherLayer.eta[layerandSoa.second],
617 clustersOnOtherLayer.phi[layerandSoa.second]);
618 bool foundHigher = (clustersOnOtherLayer.rho[layerandSoa.second] > clustersOnLayer.rho[
i]) ||
619 (clustersOnOtherLayer.rho[layerandSoa.second] == clustersOnLayer.rho[
i] &&
620 clustersOnOtherLayer.layerClusterOriginalIdx[layerandSoa.second] >
621 clustersOnLayer.layerClusterOriginalIdx[
i]);
624 <<
"Searching nearestHigher on " << currentLayer
625 <<
" with rho: " << clustersOnOtherLayer.rho[layerandSoa.second]
626 <<
" on layerIdxInSOA: " << layerandSoa.first <<
", " << layerandSoa.second
627 <<
" with distance: " <<
sqrt(dist) <<
" foundHigher: " << foundHigher;
629 if (foundHigher && dist <= i_delta) {
633 i_nearestHigher = layerandSoa;
640 bool foundNearestHigherInEtaPhiCylinder = (i_delta !=
maxDelta);
643 <<
"i_delta: " <<
sqrt(i_delta) <<
" passed: " << foundNearestHigherInEtaPhiCylinder <<
" "
644 << i_nearestHigher.first <<
" " << i_nearestHigher.second;
646 if (foundNearestHigherInEtaPhiCylinder) {
647 clustersOnLayer.delta[
i] =
sqrt(i_delta);
648 clustersOnLayer.nearestHigher[
i] = i_nearestHigher;
653 clustersOnLayer.nearestHigher[
i] = {-1, -1};
References reco::deltaR2(), mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, SiStripPI::max, allConversions_cfi::maxDelta, min(), HLT_FULL_cff::minLayer, ticl::TileConstants::nEtaBins, ticl::TileConstantsHFNose::nEtaBins, ticl::TileConstants::nPhiBins, ticl::TileConstantsHFNose::nPhiBins, hltrates_dqm_sourceclient-live_cfg::offset, trackingPOGFilters_cfi::phiWindow, and mathSSE::sqrt().
◆ calculateLocalDensity()
template<typename TILES >
void PatternRecognitionbyCLUE3D::calculateLocalDensity |
( |
const TILES & |
tiles, |
|
|
const unsigned int |
layerId, |
|
|
const std::vector< std::pair< int, int >> & |
layerIdx2layerandSoa |
|
) |
| |
|
private |
Definition at line 443 of file PatternRecognitionbyCLUE3D.cc.
445 int type = tiles[0].typeT();
448 auto &clustersOnLayer =
clusters_[layerId];
449 unsigned int numberOfClusters = clustersOnLayer.x.size();
451 auto isReachable = [&](
float x1,
float x2,
float y1,
float y2,
float delta_sqr) ->
bool {
454 << ((
x1 -
x2) * (
x1 -
x2) + (
y1 -
y2) * (
y1 -
y2)) <<
" vs " << delta_sqr <<
"["
460 for (
unsigned int i = 0;
i < numberOfClusters;
i++) {
462 auto lastLayerPerSide = static_cast<unsigned int>(
rhtools_.
lastLayer(
false)) - 1;
464 unsigned int maxLayer = 2 * lastLayerPerSide - 1;
465 if (layerId < lastLayerPerSide) {
472 for (
unsigned int currentLayer =
minLayer; currentLayer <= maxLayer; currentLayer++) {
474 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"RefLayer: " << layerId <<
" SoaIDX: " <<
i;
475 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"NextLayer: " << currentLayer;
477 const auto &tileOnLayer = tiles[currentLayer];
478 bool onSameLayer = (currentLayer == layerId);
480 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"onSameLayer: " << onSameLayer;
482 int etaWindow = onSameLayer ? 2 : 1;
484 int etaBinMin =
std::max(tileOnLayer.etaBin(clustersOnLayer.eta[
i]) - etaWindow, 0);
485 int etaBinMax =
std::min(tileOnLayer.etaBin(clustersOnLayer.eta[
i]) + etaWindow, nEtaBin);
486 int phiBinMin = tileOnLayer.phiBin(clustersOnLayer.phi[
i]) -
phiWindow;
487 int phiBinMax = tileOnLayer.phiBin(clustersOnLayer.phi[
i]) +
phiWindow;
489 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"eta: " << clustersOnLayer.eta[
i];
490 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"phi: " << clustersOnLayer.phi[
i];
491 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"etaBinMin: " << etaBinMin <<
", etaBinMax: " << etaBinMax;
492 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"phiBinMin: " << phiBinMin <<
", phiBinMax: " << phiBinMax;
499 for (
int iphi_it = phiBinMin; iphi_it <= phiBinMax; ++iphi_it) {
500 int iphi = ((iphi_it % nPhiBin + nPhiBin) % nPhiBin);
504 <<
"Entries in tileBin: " << tileOnLayer[
offset +
iphi].size();
506 for (
auto otherClusterIdx : tileOnLayer[
offset +
iphi]) {
507 auto const &layerandSoa = layerIdx2layerandSoa[otherClusterIdx];
509 if ((layerandSoa.first == -1) && (layerandSoa.second == -1)) {
511 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Skipping masked layerIdx " << otherClusterIdx;
515 auto const &clustersLayer =
clusters_[layerandSoa.first];
518 <<
"OtherLayer: " << layerandSoa.first <<
" SoaIDX: " << layerandSoa.second;
519 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"OtherEta: " << clustersLayer.eta[layerandSoa.second];
520 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"OtherPhi: " << clustersLayer.phi[layerandSoa.second];
523 float delta = clustersOnLayer.radius[
i] + clustersLayer.radius[layerandSoa.second] + 2.6f;
525 if (isReachable(clustersOnLayer.x[
i],
526 clustersLayer.x[layerandSoa.second],
527 clustersOnLayer.y[
i],
528 clustersLayer.y[layerandSoa.second],
530 clustersOnLayer.rho[
i] += (clustersOnLayer.layerClusterOriginalIdx[
i] == otherClusterIdx ? 1.f : 0.2f) *
531 clustersLayer.energy[layerandSoa.second];
537 clustersOnLayer.phi[
i],
538 clustersLayer.eta[layerandSoa.second],
539 clustersLayer.phi[layerandSoa.second]);
542 clustersOnLayer.phi[
i],
543 clustersLayer.eta[layerandSoa.second],
545 auto energyToAdd = (clustersOnLayer.layerClusterOriginalIdx[
i] == otherClusterIdx ? 1.f : 0.5f) *
546 clustersLayer.energy[layerandSoa.second];
547 clustersOnLayer.rho[
i] += energyToAdd;
549 <<
"Adding " << energyToAdd <<
" partial " << clustersOnLayer.rho[
i];
References dumpMFGeometry_cfg::delta, reco::deltaR2(), mps_fire::i, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, SiStripPI::max, min(), HLT_FULL_cff::minLayer, ticl::TileConstants::nEtaBins, ticl::TileConstantsHFNose::nEtaBins, ticl::TileConstants::nPhiBins, ticl::TileConstantsHFNose::nPhiBins, hltrates_dqm_sourceclient-live_cfg::offset, trackingPOGFilters_cfi::phiWindow, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.
◆ dumpClusters()
template<typename TILES >
void PatternRecognitionbyCLUE3D::dumpClusters |
( |
const std::vector< std::pair< int, int >> & |
layerIdx2layerandSoa, |
|
|
const int |
eventNumber |
|
) |
| const |
|
private |
Definition at line 108 of file PatternRecognitionbyCLUE3D.cc.
111 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"[evt, layer, x, y, eta, phi, cells, energy, radius, rho, delta, "
112 "isSeed, clusterIdx, layerClusterOriginalIdx";
121 for (
auto v : thisLayer.x) {
124 <<
"ClusterInfo: " << eventNumber <<
", " <<
layer <<
", " <<
v <<
", " << thisLayer.y[
num] <<
", "
125 << thisLayer.eta[
num] <<
", " << thisLayer.phi[
num] <<
", " << thisLayer.cells[
num] <<
", "
126 << thisLayer.energy[
num] <<
", " << thisLayer.radius[
num] <<
", " << thisLayer.rho[
num] <<
", "
127 << thisLayer.delta[
num] <<
", " << thisLayer.isSeed[
num] <<
", " << thisLayer.clusterIndex[
num] <<
", "
128 << thisLayer.layerClusterOriginalIdx[
num];
133 for (
unsigned int lcIdx = 0; lcIdx < layerIdx2layerandSoa.size(); lcIdx++) {
134 auto const &layerandSoa = layerIdx2layerandSoa[lcIdx];
136 if ((layerandSoa.first == -1) && (layerandSoa.second == -1))
140 <<
"lcIdx: " << lcIdx <<
" on Layer: " << layerandSoa.first <<
" SOA: " << layerandSoa.second;
References phase1PixelTopology::layer, EgammaValidation_cff::num, and findQualityFiles::v.
◆ dumpTiles()
template<typename TILES >
void PatternRecognitionbyCLUE3D::dumpTiles |
( |
const TILES & |
tiles | ) |
const |
|
private |
◆ dumpTracksters()
template<typename TILES >
void PatternRecognitionbyCLUE3D::dumpTracksters |
( |
const std::vector< std::pair< int, int >> & |
layerIdx2layerandSoa, |
|
|
const int |
eventNumber, |
|
|
const std::vector< Trackster > & |
tracksters |
|
) |
| const |
|
private |
Definition at line 76 of file PatternRecognitionbyCLUE3D.cc.
81 <<
"[evt, tracksterId, cells, prob_photon, prob_ele, prob_chad, prob_nhad, layer_i, x_i, y_i, eta_i, phi_i, "
82 "energy_i, radius_i, rho_i, delta_i, isSeed_i";
87 for (
auto const &
t : tracksters) {
88 for (
auto v :
t.vertices()) {
89 auto [lyrIdx, soaIdx] = layerIdx2layerandSoa[
v];
90 auto const &thisLayer =
clusters_[lyrIdx];
93 <<
"TracksterInfo: " << eventNumber << sep <<
num << sep <<
t.vertices().size() << sep
98 << thisLayer.x[soaIdx] << sep << thisLayer.y[soaIdx] << sep << thisLayer.eta[soaIdx] << sep
99 << thisLayer.phi[soaIdx] << sep << thisLayer.energy[soaIdx] << sep << thisLayer.radius[soaIdx] << sep
100 << thisLayer.rho[soaIdx] << sep << thisLayer.delta[soaIdx] << sep << thisLayer.isSeed[soaIdx] <<
'\n';
References ticl::Trackster::charged_hadron, ticl::Trackster::electron, ticl::Trackster::neutral_hadron, EgammaValidation_cff::num, ticl::Trackster::photon, AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and findQualityFiles::v.
◆ energyRegressionAndID()
template<typename TILES >
void PatternRecognitionbyCLUE3D::energyRegressionAndID |
( |
const std::vector< reco::CaloCluster > & |
layerClusters, |
|
|
std::vector< Trackster > & |
result |
|
) |
| |
Definition at line 304 of file PatternRecognitionbyCLUE3D.cc.
329 std::vector<int> tracksterIndices;
330 for (
int i = 0; i < static_cast<int>(tracksters.size());
i++) {
334 float sumClusterEnergy = 0.;
340 tracksters[
i].setRegressedEnergy(0.
f);
341 tracksters[
i].zeroProbabilities();
342 tracksterIndices.push_back(
i);
349 int batchSize = static_cast<int>(tracksterIndices.size());
350 if (batchSize == 0) {
356 tensorflow::Tensor
input(tensorflow::DT_FLOAT, shape);
359 std::vector<tensorflow::Tensor>
outputs;
369 for (
int i = 0;
i < batchSize;
i++) {
370 const Trackster &trackster = tracksters[tracksterIndices[
i]];
375 std::vector<int> clusterIndices(trackster.
vertices().size());
377 clusterIndices[
k] =
k;
379 sort(clusterIndices.begin(), clusterIndices.end(), [&
layerClusters, &trackster](
const int &
a,
const int &
b) {
387 for (
const int &
k : clusterIndices) {
424 for (
const int &
i : tracksterIndices) {
425 tracksters[
i].setRegressedEnergy(*(
energy++));
433 float *probs =
outputs[probsIdx].flat<
float>().
data();
435 for (
const int &
i : tracksterIndices) {
436 tracksters[
i].setProbabilities(probs);
437 probs += tracksters[
i].id_probabilities().size();
References a, funct::abs(), b, data, HCALHighEnergyHPDFilter_cfi::energy, reco::CaloCluster::energy(), reco::CaloCluster::eta(), f, lowptgsfeleseed::features(), dqmMemoryStats::float, reco::CaloCluster::hitsAndFractions(), mps_fire::i, input, createfilelist::int, dqmiolumiharvest::j, dqmdumpme::k, cmsLHEtoEOSManager::l, HLTEgPhaseIITestSequence_cff::layerClusters, jets_cff::outputNames, PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs, reco::CaloCluster::phi(), tensorflow::run(), jetUpdater_cfi::sort, bphysicsOniaDQM_cfi::vertex, ticl::Trackster::vertex_multiplicity(), AlignmentTracksFromVertexSelector_cfi::vertices, and ticl::Trackster::vertices().
◆ fillPSetDescription()
template<typename TILES >
Definition at line 719 of file PatternRecognitionbyCLUE3D.cc.
720 iDesc.
add<
int>(
"algo_verbosity", 0);
721 iDesc.
add<
double>(
"criticalDensity", 4)->setComment(
"in GeV");
722 iDesc.
add<
int>(
"densitySiblingLayers", 3);
723 iDesc.
add<
double>(
"densityEtaPhiDistanceSqr", 0.0008);
724 iDesc.
add<
bool>(
"densityOnSameLayer",
false);
725 iDesc.
add<
double>(
"criticalEtaPhiDistance", 0.035);
726 iDesc.
add<
double>(
"outlierMultiplier", 2);
727 iDesc.
add<
int>(
"minNumLayerCluster", 5)->setComment(
"Not Inclusive");
729 iDesc.
add<
std::string>(
"eid_output_name_energy",
"output/regressed_energy");
730 iDesc.
add<
std::string>(
"eid_output_name_id",
"output/id_probabilities");
731 iDesc.
add<
double>(
"eid_min_cluster_energy", 1.);
732 iDesc.
add<
int>(
"eid_n_layers", 50);
733 iDesc.
add<
int>(
"eid_n_clusters", 10);
References edm::ParameterSetDescription::add(), and AlCaHLTBitMon_QueryRunRegistry::string.
◆ findAndAssignTracksters()
template<typename TILES >
int PatternRecognitionbyCLUE3D::findAndAssignTracksters |
( |
const TILES & |
tiles, |
|
|
const std::vector< std::pair< int, int >> & |
layerIdx2layerandSoa |
|
) |
| |
|
private |
Definition at line 659 of file PatternRecognitionbyCLUE3D.cc.
661 unsigned int nTracksters = 0;
663 std::vector<std::pair<int, int>> localStack;
667 unsigned int numberOfClusters = clustersOnLayer.x.size();
668 for (
unsigned int i = 0;
i < numberOfClusters;
i++) {
670 clustersOnLayer.clusterIndex[
i] = -1;
678 <<
"Found seed on Layer " <<
layer <<
" SOAidx: " <<
i <<
" assigned ClusterIdx: " << nTracksters;
680 clustersOnLayer.clusterIndex[
i] = nTracksters++;
681 clustersOnLayer.isSeed[
i] =
true;
682 localStack.emplace_back(
layer,
i);
683 }
else if (!isOutlier) {
684 auto [lyrIdx, soaIdx] = clustersOnLayer.nearestHigher[
i];
687 <<
"Found follower on Layer " <<
layer <<
" SOAidx: " <<
i <<
" attached to cluster on layer: " << lyrIdx
688 <<
" SOAidx: " << soaIdx;
694 <<
"Found Outlier on Layer " <<
layer <<
" SOAidx: " <<
i <<
" with rho: " << clustersOnLayer.rho[
i]
695 <<
" and delta: " << clustersOnLayer.delta[
i];
702 while (!localStack.empty()) {
703 auto [lyrIdx, soaIdx] = localStack.back();
704 auto &thisSeed =
clusters_[lyrIdx].followers[soaIdx];
705 localStack.pop_back();
708 for (
auto [follower_lyrIdx, follower_soaIdx] : thisSeed) {
710 clusters_[follower_lyrIdx].clusterIndex[follower_soaIdx] =
clusters_[lyrIdx].clusterIndex[soaIdx];
712 localStack.emplace_back(follower_lyrIdx, follower_soaIdx);
References mps_fire::i, and phase1PixelTopology::layer.
◆ makeTracksters()
template<typename TILES >
void PatternRecognitionbyCLUE3D::makeTracksters |
( |
const typename PatternRecognitionAlgoBaseT< TILES >::Inputs & |
input, |
|
|
std::vector< Trackster > & |
result, |
|
|
std::unordered_map< int, std::vector< int >> & |
seedToTracksterAssociation |
|
) |
| |
|
override |
Definition at line 146 of file PatternRecognitionbyCLUE3D.cc.
151 if (
input.regions.empty())
154 const int eventNumber =
input.ev.eventAuxiliary().event();
165 std::vector<std::pair<int, int>> layerIdx2layerandSoa;
167 layerIdx2layerandSoa.reserve(
input.layerClusters.size());
168 unsigned int layerIdx = 0;
169 for (
auto const &lc :
input.layerClusters) {
170 if (
input.mask[layerIdx] == 0.) {
172 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Skipping masked clustrer: " << layerIdx;
174 layerIdx2layerandSoa.emplace_back(-1, -1);
178 const auto firstHitDetId = lc.hitsAndFractions()[0].first;
186 float sum_sqr_x = 0.;
187 float sum_sqr_y = 0.;
188 float ref_x = lc.x();
189 float ref_y = lc.y();
190 float invClsize = 1. / lc.hitsAndFractions().size();
191 for (
auto const &hitsAndFractions : lc.hitsAndFractions()) {
194 sum_sqr_x += (
point.x() - ref_x) * (
point.x() - ref_x);
196 sum_sqr_y += (
point.y() - ref_y) * (
point.y() - ref_y);
203 float radius_x =
sqrt((sum_sqr_x - (
sum_x *
sum_x) * invClsize) * invClsize);
204 float radius_y =
sqrt((sum_sqr_y - (
sum_y *
sum_y) * invClsize) * invClsize);
214 clusters_[
layer].layerClusterOriginalIdx.emplace_back(layerIdx++);
224 unsigned int maxLayer = 2 * lastLayerPerSide - 1;
225 std::vector<int> numberOfClustersPerLayer(maxLayer, 0);
226 for (
unsigned int i = 0;
i <= maxLayer;
i++) {
229 for (
unsigned int i = 0;
i <= maxLayer;
i++) {
235 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Reconstructed " << nTracksters <<
" tracksters" << std::endl;
240 result.resize(nTracksters);
247 for (
unsigned int lc = 0; lc < thisLayer.x.size(); ++lc) {
249 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Trackster " << thisLayer.clusterIndex[lc];
251 if (thisLayer.clusterIndex[lc] >= 0) {
253 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
" adding lcIdx: " << thisLayer.layerClusterOriginalIdx[lc];
255 result[thisLayer.clusterIndex[lc]].vertices().push_back(thisLayer.layerClusterOriginalIdx[lc]);
256 result[thisLayer.clusterIndex[lc]].vertex_multiplicity().push_back(1);
258 for (
auto [follower_lyrIdx, follower_soaIdx] : thisLayer.followers[lc]) {
259 std::array<unsigned int, 2> edge = {
260 {(
unsigned int)thisLayer.layerClusterOriginalIdx[lc],
261 (
unsigned int)
clusters_[follower_lyrIdx].layerClusterOriginalIdx[follower_soaIdx]}};
262 result[thisLayer.clusterIndex[lc]].edges().push_back(edge);
269 std::remove_if(std::begin(
result),
277 input.layerClustersTime,
284 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Barycenter: " <<
t.barycenter();
287 edm::LogVerbatim(
"PatternRecogntionbyCLUE3D") <<
"Regressed: " <<
t.regressed_energy();
References cms::cuda::assert(), ticl::assignPCAtoTracksters(), mps_fire::end, f, relativeConstraints::geom, edm::EventSetup::getData(), mps_fire::i, input, createfilelist::int, phase1PixelTopology::layer, SiStripPI::max, point, reset(), mps_fire::result, mathSSE::sqrt(), makeMuonMisalignmentScenario::sum_x, makeMuonMisalignmentScenario::sum_y, submitPVValidationJobs::t, and findQualityFiles::v.
◆ reset()
template<typename TILES >
◆ caloGeomToken_
template<typename TILES >
◆ clusters_
template<typename TILES >
◆ criticalDensity_
template<typename TILES >
◆ criticalEtaPhiDistance_
template<typename TILES >
◆ densityEtaPhiDistanceSqr_
template<typename TILES >
◆ densityOnSameLayer_
template<typename TILES >
◆ densitySiblingLayers_
template<typename TILES >
◆ eidInputName_
template<typename TILES >
◆ eidMinClusterEnergy_
template<typename TILES >
◆ eidNClusters_
template<typename TILES >
◆ eidNFeatures_
template<typename TILES >
◆ eidNLayers_
template<typename TILES >
◆ eidOutputNameEnergy_
template<typename TILES >
◆ eidOutputNameId_
template<typename TILES >
◆ eidSession_
template<typename TILES >
◆ filter_on_categories_
template<typename TILES >
◆ minNumLayerCluster_
template<typename TILES >
◆ outlierMultiplier_
template<typename TILES >
◆ rhtools_
template<typename TILES >
double phi() const
azimuthal angle of cluster centroid
const std::string eidInputName_
Session * createSession(SessionOptions &sessionOptions)
static constexpr int nEtaBins
void energyRegressionAndID(const std::vector< reco::CaloCluster > &layerClusters, std::vector< Trackster > &result)
static constexpr int nEtaBins
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static const std::string input
std::vector< ClustersOnLayer > clusters_
void calculateDistanceToHigher(const TILES &, const unsigned int layerId, const std::vector< std::pair< int, int >> &)
const float eidMinClusterEnergy_
static constexpr int nPhiBins
void dumpTracksters(const std::vector< std::pair< int, int >> &layerIdx2layerandSoa, const int, const std::vector< Trackster > &) const
const std::string eidOutputNameId_
static constexpr int nPhiBins
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, const edm::ValueMap< std::pair< float, float >> &, double, bool energyWeight=true)
const double criticalDensity_
void dumpClusters(const std::vector< std::pair< int, int >> &layerIdx2layerandSoa, const int) const
void calculateLocalDensity(const TILES &, const unsigned int layerId, const std::vector< std::pair< int, int >> &)
int findAndAssignTracksters(const TILES &, const std::vector< std::pair< int, int >> &)
std::vector< float > features(const reco::PreId &ecal, const reco::PreId &hcal, double rho, const reco::BeamSpot &spot, noZS::EcalClusterLazyTools &ecalTools)
constexpr std::array< uint8_t, layerIndexSize > layer
double eta() const
pseudorapidity of cluster centroid
hgcal::RecHitTools rhtools_
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
const int densitySiblingLayers_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
std::vector< NamedTensor > NamedTensorList
const double densityEtaPhiDistanceSqr_
std::vector< float > & vertex_multiplicity()
const double outlierMultiplier_
tensorflow::Session * eidSession_
std::atomic< tensorflow::GraphDef * > eidGraphDef
const std::string eidOutputNameEnergy_
const double densityOnSameLayer_
bool getData(T &iHolder) const
const double criticalEtaPhiDistance_
Log< level::Info, true > LogVerbatim
std::vector< unsigned int > & vertices()
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
T getParameter(std::string const &) const
char data[epos_bytes_allocation]
static const int eidNFeatures_
const int minNumLayerCluster_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
Abs< T >::type abs(const T &t)
int sum_x
More diagnostics.
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
double energy() const
cluster energy