CMS 3D CMS Logo

PatternRecognitionbyCA.cc
Go to the documentation of this file.
1 // Author: Felice Pantaleo, Marco Rovere - felice.pantaleo@cern.ch, marco.rovere@cern.ch
2 // Date: 11/2018
3 #include <algorithm>
4 #include <set>
5 #include <vector>
6 
11 
12 #include "TrackstersPCA.h"
16 
17 using namespace ticl;
18 
19 template <typename TILES>
21  : PatternRecognitionAlgoBaseT<TILES>(conf, cache),
22  theGraph_(std::make_unique<HGCGraphT<TILES>>()),
23  oneTracksterPerTrackSeed_(conf.getParameter<bool>("oneTracksterPerTrackSeed")),
24  promoteEmptyRegionToTrackster_(conf.getParameter<bool>("promoteEmptyRegionToTrackster")),
25  out_in_dfs_(conf.getParameter<bool>("out_in_dfs")),
26  max_out_in_hops_(conf.getParameter<int>("max_out_in_hops")),
27  min_cos_theta_(conf.getParameter<double>("min_cos_theta")),
28  min_cos_pointing_(conf.getParameter<double>("min_cos_pointing")),
29  root_doublet_max_distance_from_seed_squared_(
30  conf.getParameter<double>("root_doublet_max_distance_from_seed_squared")),
31  etaLimitIncreaseWindow_(conf.getParameter<double>("etaLimitIncreaseWindow")),
32  skip_layers_(conf.getParameter<int>("skip_layers")),
33  max_missing_layers_in_trackster_(conf.getParameter<int>("max_missing_layers_in_trackster")),
34  check_missing_layers_(max_missing_layers_in_trackster_ < 100),
35  shower_start_max_layer_(conf.getParameter<int>("shower_start_max_layer")),
36  min_layers_per_trackster_(conf.getParameter<int>("min_layers_per_trackster")),
37  filter_on_categories_(conf.getParameter<std::vector<int>>("filter_on_categories")),
38  pid_threshold_(conf.getParameter<double>("pid_threshold")),
39  energy_em_over_total_threshold_(conf.getParameter<double>("energy_em_over_total_threshold")),
40  max_longitudinal_sigmaPCA_(conf.getParameter<double>("max_longitudinal_sigmaPCA")),
41  min_clusters_per_ntuplet_(min_layers_per_trackster_),
42  max_delta_time_(conf.getParameter<double>("max_delta_time")),
43  eidInputName_(conf.getParameter<std::string>("eid_input_name")),
44  eidOutputNameEnergy_(conf.getParameter<std::string>("eid_output_name_energy")),
45  eidOutputNameId_(conf.getParameter<std::string>("eid_output_name_id")),
46  eidMinClusterEnergy_(conf.getParameter<double>("eid_min_cluster_energy")),
47  eidNLayers_(conf.getParameter<int>("eid_n_layers")),
48  eidNClusters_(conf.getParameter<int>("eid_n_clusters")),
49  eidSession_(nullptr) {
50  // mount the tensorflow graph onto the session when set
51  const TrackstersCache *trackstersCache = dynamic_cast<const TrackstersCache *>(cache);
52  if (trackstersCache == nullptr || trackstersCache->eidGraphDef == nullptr) {
53  throw cms::Exception("MissingGraphDef")
54  << "PatternRecognitionbyCA received an empty graph definition from the global cache";
55  }
57 }
58 
59 template <typename TILES>
61 
62 template <typename TILES>
65  std::vector<Trackster> &result,
66  std::unordered_map<int, std::vector<int>> &seedToTracksterAssociation) {
67  // Protect from events with no seeding regions
68  if (input.regions.empty())
69  return;
70 
72  edm::EventSetup const &es = input.es;
74  rhtools_.setGeometry(*geom);
75 
77  theGraph_->clear();
79  LogDebug("HGCPatternRecoByCA") << "Making Tracksters with CA" << std::endl;
80  }
81 
82  int type = input.tiles[0].typeT();
85 
86  bool isRegionalIter = (input.regions[0].index != -1);
87  std::vector<HGCDoublet::HGCntuplet> foundNtuplets;
88  std::vector<int> seedIndices;
89  std::vector<uint8_t> layer_cluster_usage(input.layerClusters.size(), 0);
90  theGraph_->makeAndConnectDoublets(input.tiles,
91  input.regions,
92  nEtaBin,
93  nPhiBin,
94  input.layerClusters,
95  input.mask,
96  input.layerClustersTime,
97  1,
98  1,
99  min_cos_theta_,
100  min_cos_pointing_,
101  root_doublet_max_distance_from_seed_squared_,
102  etaLimitIncreaseWindow_,
103  skip_layers_,
104  rhtools_.lastLayer(type),
105  max_delta_time_);
106 
107  theGraph_->findNtuplets(foundNtuplets, seedIndices, min_clusters_per_ntuplet_, out_in_dfs_, max_out_in_hops_);
108  //#ifdef FP_DEBUG
109  const auto &doublets = theGraph_->getAllDoublets();
110  int tracksterId = -1;
111 
112  // container for holding tracksters before selection
113  std::vector<Trackster> tmpTracksters;
114  tmpTracksters.reserve(foundNtuplets.size());
115 
116  for (auto const &ntuplet : foundNtuplets) {
117  tracksterId++;
118 
119  std::set<unsigned int> effective_cluster_idx;
120  std::pair<std::set<unsigned int>::iterator, bool> retVal;
121 
122  std::vector<float> times;
123  std::vector<float> timeErrors;
124 
125  for (auto const &doublet : ntuplet) {
126  auto innerCluster = doublets[doublet].innerClusterId();
127  auto outerCluster = doublets[doublet].outerClusterId();
128 
129  retVal = effective_cluster_idx.insert(innerCluster);
130  if (retVal.second) {
131  float time = input.layerClustersTime.get(innerCluster).first;
132  if (time > -99) {
133  times.push_back(time);
134  timeErrors.push_back(1. / pow(input.layerClustersTime.get(innerCluster).second, 2));
135  }
136  }
137 
138  retVal = effective_cluster_idx.insert(outerCluster);
139  if (retVal.second) {
140  float time = input.layerClustersTime.get(outerCluster).first;
141  if (time > -99) {
142  times.push_back(time);
143  timeErrors.push_back(1. / pow(input.layerClustersTime.get(outerCluster).second, 2));
144  }
145  }
146 
148  LogDebug("HGCPatternRecoByCA") << " New doublet " << doublet << " for trackster: " << result.size()
149  << " InnerCl " << innerCluster << " " << input.layerClusters[innerCluster].x()
150  << " " << input.layerClusters[innerCluster].y() << " "
151  << input.layerClusters[innerCluster].z() << " OuterCl " << outerCluster << " "
152  << input.layerClusters[outerCluster].x() << " "
153  << input.layerClusters[outerCluster].y() << " "
154  << input.layerClusters[outerCluster].z() << " " << tracksterId << std::endl;
155  }
156  }
157  unsigned showerMinLayerId = 99999;
158  std::vector<unsigned int> uniqueLayerIds;
159  uniqueLayerIds.reserve(effective_cluster_idx.size());
160  std::vector<std::pair<unsigned int, unsigned int>> lcIdAndLayer;
161  lcIdAndLayer.reserve(effective_cluster_idx.size());
162  for (auto const i : effective_cluster_idx) {
163  auto const &haf = input.layerClusters[i].hitsAndFractions();
164  auto layerId = rhtools_.getLayerWithOffset(haf[0].first);
165  showerMinLayerId = std::min(layerId, showerMinLayerId);
166  uniqueLayerIds.push_back(layerId);
167  lcIdAndLayer.emplace_back(i, layerId);
168  }
169  std::sort(uniqueLayerIds.begin(), uniqueLayerIds.end());
170  uniqueLayerIds.erase(std::unique(uniqueLayerIds.begin(), uniqueLayerIds.end()), uniqueLayerIds.end());
171  unsigned int numberOfLayersInTrackster = uniqueLayerIds.size();
172  if (check_missing_layers_) {
173  int numberOfMissingLayers = 0;
174  unsigned int j = showerMinLayerId;
175  unsigned int indexInVec = 0;
176  for (const auto &layer : uniqueLayerIds) {
177  if (layer != j) {
178  numberOfMissingLayers++;
179  j++;
180  if (numberOfMissingLayers > max_missing_layers_in_trackster_) {
181  numberOfLayersInTrackster = indexInVec;
182  for (auto &llpair : lcIdAndLayer) {
183  if (llpair.second >= layer) {
184  effective_cluster_idx.erase(llpair.first);
185  }
186  }
187  break;
188  }
189  }
190  indexInVec++;
191  j++;
192  }
193  }
194 
195  if ((numberOfLayersInTrackster >= min_layers_per_trackster_) and (showerMinLayerId <= shower_start_max_layer_)) {
196  // Put back indices, in the form of a Trackster, into the results vector
197  Trackster tmp;
198  tmp.vertices().reserve(effective_cluster_idx.size());
199  tmp.vertex_multiplicity().resize(effective_cluster_idx.size(), 1);
200  //regions and seedIndices can have different size
201  //if a seeding region does not lead to any trackster
202  tmp.setSeed(input.regions[0].collectionID, seedIndices[tracksterId]);
203 
204  std::pair<float, float> timeTrackster(-99., -1.);
206  timeTrackster = timeEstimator.fixSizeHighestDensity(times, timeErrors);
207  tmp.setTimeAndError(timeTrackster.first, timeTrackster.second);
208  std::copy(std::begin(effective_cluster_idx), std::end(effective_cluster_idx), std::back_inserter(tmp.vertices()));
209  tmpTracksters.push_back(tmp);
210  }
211  }
213  tmpTracksters, input.layerClusters, rhtools_.getPositionLayer(rhtools_.lastLayerEE(type)).z());
214 
215  // run energy regression and ID
216  energyRegressionAndID(input.layerClusters, tmpTracksters);
217  // Filter results based on PID criteria or EM/Total energy ratio.
218  // We want to **keep** tracksters whose cumulative
219  // probability summed up over the selected categories
220  // is greater than the chosen threshold. Therefore
221  // the filtering function should **discard** all
222  // tracksters **below** the threshold.
223  auto filter_on_pids = [&](Trackster &t) -> bool {
224  auto cumulative_prob = 0.;
225  for (auto index : filter_on_categories_) {
226  cumulative_prob += t.id_probabilities(index);
227  }
228  return (cumulative_prob <= pid_threshold_) &&
229  (t.raw_em_energy() < energy_em_over_total_threshold_ * t.raw_energy());
230  };
231 
232  std::vector<unsigned int> selectedTrackstersIds;
233  for (unsigned i = 0; i < tmpTracksters.size(); ++i) {
234  if (!filter_on_pids(tmpTracksters[i]) and tmpTracksters[i].sigmasPCA()[0] < max_longitudinal_sigmaPCA_) {
235  selectedTrackstersIds.push_back(i);
236  }
237  }
238 
239  result.reserve(selectedTrackstersIds.size());
240 
241  for (unsigned i = 0; i < selectedTrackstersIds.size(); ++i) {
242  const auto &t = tmpTracksters[selectedTrackstersIds[i]];
243  for (auto const lcId : t.vertices()) {
244  layer_cluster_usage[lcId]++;
246  LogDebug("HGCPatternRecoByCA") << "LayerID: " << lcId << " count: " << (int)layer_cluster_usage[lcId]
247  << std::endl;
248  }
249  if (isRegionalIter) {
250  seedToTracksterAssociation[t.seedIndex()].push_back(i);
251  }
252  result.push_back(t);
253  }
254 
255  for (auto &trackster : result) {
256  assert(trackster.vertices().size() <= trackster.vertex_multiplicity().size());
257  for (size_t i = 0; i < trackster.vertices().size(); ++i) {
258  trackster.vertex_multiplicity()[i] = layer_cluster_usage[trackster.vertices(i)];
260  LogDebug("HGCPatternRecoByCA") << "LayerID: " << trackster.vertices(i)
261  << " count: " << (int)trackster.vertex_multiplicity(i) << std::endl;
262  }
263  }
264  // Now decide if the tracksters from the track-based iterations have to be merged
265  if (oneTracksterPerTrackSeed_) {
266  std::vector<Trackster> tmp;
267  mergeTrackstersTRK(result, input.layerClusters, tmp, seedToTracksterAssociation);
268  tmp.swap(result);
269  }
270 
271  ticl::assignPCAtoTracksters(result, input.layerClusters, rhtools_.getPositionLayer(rhtools_.lastLayerEE(type)).z());
272  // run energy regression and ID
273  energyRegressionAndID(input.layerClusters, result);
274 
275  // now adding dummy tracksters from seeds not connected to any shower in the result collection
276  // these are marked as charged hadrons with probability 1.
277  if (promoteEmptyRegionToTrackster_) {
278  emptyTrackstersFromSeedsTRK(result, seedToTracksterAssociation, input.regions[0].collectionID);
279  }
280 
282  for (auto &trackster : result) {
283  LogDebug("HGCPatternRecoByCA") << "Trackster characteristics: " << std::endl;
284  LogDebug("HGCPatternRecoByCA") << "Size: " << trackster.vertices().size() << std::endl;
285  auto counter = 0;
286  for (auto const &p : trackster.id_probabilities()) {
287  LogDebug("HGCPatternRecoByCA") << counter++ << ": " << p << std::endl;
288  }
289  }
290  }
291  theGraph_->clear();
292 }
293 
294 template <typename TILES>
296  const std::vector<Trackster> &input,
297  const std::vector<reco::CaloCluster> &layerClusters,
298  std::vector<Trackster> &output,
299  std::unordered_map<int, std::vector<int>> &seedToTracksterAssociation) const {
300  output.reserve(input.size());
301  for (auto &thisSeed : seedToTracksterAssociation) {
302  auto &tracksters = thisSeed.second;
303  if (!tracksters.empty()) {
304  auto numberOfTrackstersInSeed = tracksters.size();
305  output.emplace_back(input[tracksters[0]]);
306  auto &outTrackster = output.back();
307  tracksters[0] = output.size() - 1;
308  auto updated_size = outTrackster.vertices().size();
309  for (unsigned int j = 1; j < numberOfTrackstersInSeed; ++j) {
310  auto &thisTrackster = input[tracksters[j]];
311  updated_size += thisTrackster.vertices().size();
313  LogDebug("HGCPatternRecoByCA") << "Updated size: " << updated_size << std::endl;
314  }
315  outTrackster.vertices().reserve(updated_size);
316  outTrackster.vertex_multiplicity().reserve(updated_size);
317  std::copy(std::begin(thisTrackster.vertices()),
318  std::end(thisTrackster.vertices()),
319  std::back_inserter(outTrackster.vertices()));
320  std::copy(std::begin(thisTrackster.vertex_multiplicity()),
321  std::end(thisTrackster.vertex_multiplicity()),
322  std::back_inserter(outTrackster.vertex_multiplicity()));
323  }
324  tracksters.resize(1);
325  }
326  }
327  output.shrink_to_fit();
328 }
329 
330 template <typename TILES>
332  std::vector<Trackster> &tracksters,
333  std::unordered_map<int, std::vector<int>> &seedToTracksterAssociation,
334  const edm::ProductID &collectionID) const {
335  for (auto &thisSeed : seedToTracksterAssociation) {
336  if (thisSeed.second.empty()) {
337  Trackster t;
338  t.setRegressedEnergy(0.f);
339  t.zeroProbabilities();
341  t.setSeed(collectionID, thisSeed.first);
342  tracksters.emplace_back(t);
343  thisSeed.second.emplace_back(tracksters.size() - 1);
344  }
345  }
346 }
347 
348 template <typename TILES>
349 void PatternRecognitionbyCA<TILES>::energyRegressionAndID(const std::vector<reco::CaloCluster> &layerClusters,
350  std::vector<Trackster> &tracksters) {
351  // Energy regression and particle identification strategy:
352  //
353  // 1. Set default values for regressed energy and particle id for each trackster.
354  // 2. Store indices of tracksters whose total sum of cluster energies is above the
355  // eidMinClusterEnergy_ (GeV) treshold. Inference is not applied for soft tracksters.
356  // 3. When no trackster passes the selection, return.
357  // 4. Create input and output tensors. The batch dimension is determined by the number of
358  // selected tracksters.
359  // 5. Fill input tensors with layer cluster features. Per layer, clusters are ordered descending
360  // by energy. Given that tensor data is contiguous in memory, we can use pointer arithmetic to
361  // fill values, even with batching.
362  // 6. Zero-fill features for empty clusters in each layer.
363  // 7. Batched inference.
364  // 8. Assign the regressed energy and id probabilities to each trackster.
365  //
366  // Indices used throughout this method:
367  // i -> batch element / trackster
368  // j -> layer
369  // k -> cluster
370  // l -> feature
371 
372  // set default values per trackster, determine if the cluster energy threshold is passed,
373  // and store indices of hard tracksters
374  std::vector<int> tracksterIndices;
375  for (int i = 0; i < (int)tracksters.size(); i++) {
376  // calculate the cluster energy sum (2)
377  // note: after the loop, sumClusterEnergy might be just above the threshold which is enough to
378  // decide whether to run inference for the trackster or not
379  float sumClusterEnergy = 0.;
380  for (const unsigned int &vertex : tracksters[i].vertices()) {
381  sumClusterEnergy += (float)layerClusters[vertex].energy();
382  // there might be many clusters, so try to stop early
383  if (sumClusterEnergy >= eidMinClusterEnergy_) {
384  // set default values (1)
385  tracksters[i].setRegressedEnergy(0.f);
386  tracksters[i].zeroProbabilities();
387  tracksterIndices.push_back(i);
388  break;
389  }
390  }
391  }
392 
393  // do nothing when no trackster passes the selection (3)
394  int batchSize = (int)tracksterIndices.size();
395  if (batchSize == 0) {
396  return;
397  }
398 
399  // create input and output tensors (4)
400  tensorflow::TensorShape shape({batchSize, eidNLayers_, eidNClusters_, eidNFeatures_});
401  tensorflow::Tensor input(tensorflow::DT_FLOAT, shape);
402  tensorflow::NamedTensorList inputList = {{eidInputName_, input}};
403 
404  std::vector<tensorflow::Tensor> outputs;
405  std::vector<std::string> outputNames;
406  if (!eidOutputNameEnergy_.empty()) {
407  outputNames.push_back(eidOutputNameEnergy_);
408  }
409  if (!eidOutputNameId_.empty()) {
410  outputNames.push_back(eidOutputNameId_);
411  }
412 
413  // fill input tensor (5)
414  for (int i = 0; i < batchSize; i++) {
415  const Trackster &trackster = tracksters[tracksterIndices[i]];
416 
417  // per layer, we only consider the first eidNClusters_ clusters in terms of energy, so in order
418  // to avoid creating large / nested structures to do the sorting for an unknown number of total
419  // clusters, create a sorted list of layer cluster indices to keep track of the filled clusters
420  std::vector<int> clusterIndices(trackster.vertices().size());
421  for (int k = 0; k < (int)trackster.vertices().size(); k++) {
422  clusterIndices[k] = k;
423  }
424  sort(clusterIndices.begin(), clusterIndices.end(), [&layerClusters, &trackster](const int &a, const int &b) {
425  return layerClusters[trackster.vertices(a)].energy() > layerClusters[trackster.vertices(b)].energy();
426  });
427 
428  // keep track of the number of seen clusters per layer
429  std::vector<int> seenClusters(eidNLayers_);
430 
431  // loop through clusters by descending energy
432  for (const int &k : clusterIndices) {
433  // get features per layer and cluster and store the values directly in the input tensor
434  const reco::CaloCluster &cluster = layerClusters[trackster.vertices(k)];
435  int j = rhtools_.getLayerWithOffset(cluster.hitsAndFractions()[0].first) - 1;
436  if (j < eidNLayers_ && seenClusters[j] < eidNClusters_) {
437  // get the pointer to the first feature value for the current batch, layer and cluster
438  float *features = &input.tensor<float, 4>()(i, j, seenClusters[j], 0);
439 
440  // fill features
441  *(features++) = float(cluster.energy() / float(trackster.vertex_multiplicity(k)));
442  *(features++) = float(std::abs(cluster.eta()));
443  *(features) = float(cluster.phi());
444 
445  // increment seen clusters
446  seenClusters[j]++;
447  }
448  }
449 
450  // zero-fill features of empty clusters in each layer (6)
451  for (int j = 0; j < eidNLayers_; j++) {
452  for (int k = seenClusters[j]; k < eidNClusters_; k++) {
453  float *features = &input.tensor<float, 4>()(i, j, k, 0);
454  for (int l = 0; l < eidNFeatures_; l++) {
455  *(features++) = 0.f;
456  }
457  }
458  }
459  }
460 
461  // run the inference (7)
462  tensorflow::run(eidSession_, inputList, outputNames, &outputs);
463 
464  // store regressed energy per trackster (8)
465  if (!eidOutputNameEnergy_.empty()) {
466  // get the pointer to the energy tensor, dimension is batch x 1
467  float *energy = outputs[0].flat<float>().data();
468 
469  for (const int &i : tracksterIndices) {
470  tracksters[i].setRegressedEnergy(*(energy++));
471  }
472  }
473 
474  // store id probabilities per trackster (8)
475  if (!eidOutputNameId_.empty()) {
476  // get the pointer to the id probability tensor, dimension is batch x id_probabilities.size()
477  int probsIdx = eidOutputNameEnergy_.empty() ? 0 : 1;
478  float *probs = outputs[probsIdx].flat<float>().data();
479 
480  for (const int &i : tracksterIndices) {
481  tracksters[i].setProbabilities(probs);
482  probs += tracksters[i].id_probabilities().size();
483  }
484  }
485 }
486 
reco::CaloCluster::phi
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
tensorflow::createSession
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:85
TrackstersPCA.h
counter
Definition: counter.py:1
ticl::TileConstantsHFNose::nEtaBins
static constexpr int nEtaBins
Definition: Common.h:23
ticl::assignPCAtoTracksters
void assignPCAtoTracksters(std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, double, bool energyWeight=true)
Definition: TrackstersPCA.cc:10
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
ticl::TileConstants::nEtaBins
static constexpr int nEtaBins
Definition: Common.h:12
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
ticl::TileConstantsHFNose::nPhiBins
static constexpr int nPhiBins
Definition: Common.h:24
min
T min(T a, T b)
Definition: MathUtil.h:58
postprocess-scan-build.features
features
Definition: postprocess-scan-build.py:8
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
ticl::Trackster::ParticleType::charged_hadron
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PatBasicFWLiteJetAnalyzer_Selector_cfg.outputs
outputs
Definition: PatBasicFWLiteJetAnalyzer_Selector_cfg.py:48
cms::cuda::assert
assert(be >=bs)
ticl::TileConstants::nPhiBins
static constexpr int nPhiBins
Definition: Common.h:13
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
ticl
Definition: Common.h:8
dqmdumpme.first
first
Definition: dqmdumpme.py:55
end
#define end
Definition: vmac.h:39
hgcalsimclustertime::ComputeClusterTime::fixSizeHighestDensity
std::pair< float, float > fixSizeHighestDensity(std::vector< float > &time, std::vector< float > weight=std::vector< float >(), unsigned int minNhits=3, float deltaT=0.210, float timeWidthBy=0.5)
Definition: ComputeClusterTime.cc:64
ticl::PatternRecognitionAlgoBaseT
Definition: PatternRecognitionAlgoBase.h:24
HLT_2018_cff.doublets
doublets
Definition: HLT_2018_cff.py:8544
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
ticl::PatternRecognitionbyCA::eidSession_
tensorflow::Session * eidSession_
Definition: PatternRecognitionbyCA.h:61
ticl::TrackstersCache
Definition: GlobalCache.h:19
ticl::CacheBase
Definition: GlobalCache.h:11
ticl::PatternRecognitionbyCA::~PatternRecognitionbyCA
~PatternRecognitionbyCA() override
Definition: PatternRecognitionbyCA.cc:60
reco::CaloCluster
Definition: CaloCluster.h:31
ticl::Trackster::vertex_multiplicity
std::vector< uint8_t > & vertex_multiplicity()
Definition: Trackster.h:54
edm::ESHandle< CaloGeometry >
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HLTEgPhaseIITestSequence_cff.layerClusters
layerClusters
Definition: HLTEgPhaseIITestSequence_cff.py:2506
OrderedSet.t
t
Definition: OrderedSet.py:90
ticl::PatternRecognitionbyCA::emptyTrackstersFromSeedsTRK
void emptyTrackstersFromSeedsTRK(std::vector< Trackster > &tracksters, std::unordered_map< int, std::vector< int >> &seedToTracksterAssociation, const edm::ProductID &collectionID) const
Definition: PatternRecognitionbyCA.cc:331
b
double b
Definition: hdecay.h:118
utilities.cache
def cache(function)
Definition: utilities.py:3
CaloGeometryRecord.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ComputeClusterTime.h
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
ticl::PatternRecognitionbyCA::makeTracksters
void makeTracksters(const typename PatternRecognitionAlgoBaseT< TILES >::Inputs &input, std::vector< Trackster > &result, std::unordered_map< int, std::vector< int >> &seedToTracksterAssociation) override
Definition: PatternRecognitionbyCA.cc:63
a
double a
Definition: hdecay.h:119
reco::CaloCluster::eta
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
reco::CaloCluster::hitsAndFractions
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
tensorflow::NamedTensorList
std::vector< NamedTensor > NamedTensorList
Definition: TensorFlow.h:30
createfilelist.int
int
Definition: createfilelist.py:10
ticl::PatternRecognitionAlgoBaseT::Inputs
Definition: PatternRecognitionAlgoBase.h:30
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
ticl::TrackstersCache::eidGraphDef
std::atomic< tensorflow::GraphDef * > eidGraphDef
Definition: GlobalCache.h:25
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
PatternRecognitionbyCA.h
ticl::PatternRecognitionbyCA::PatternRecognitionbyCA
PatternRecognitionbyCA(const edm::ParameterSet &conf, const CacheBase *cache)
Definition: PatternRecognitionbyCA.cc:20
type
type
Definition: HCALResponse.h:21
std
Definition: JetResolutionObject.h:76
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
ticl::Trackster::vertices
std::vector< unsigned int > & vertices()
Definition: Trackster.h:53
Exception
Definition: hltDiff.cc:246
CaloGeometry.h
tensorflow::run
void run(Session *session, const NamedTensorList &inputs, const std::vector< std::string > &outputNames, std::vector< Tensor > *outputs, const thread::ThreadPoolOptions &threadPoolOptions)
Definition: TensorFlow.cc:211
hgcalsimclustertime::ComputeClusterTime
Definition: ComputeClusterTime.h:23
EventSetup.h
Exception.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
ticl::PatternRecognitionbyCA::energyRegressionAndID
void energyRegressionAndID(const std::vector< reco::CaloCluster > &layerClusters, std::vector< Trackster > &result)
Definition: PatternRecognitionbyCA.cc:349
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HGCGraphT
Definition: HGCGraph.h:15
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
mps_fire.result
result
Definition: mps_fire.py:303
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
ticl::PatternRecognitionbyCA
Definition: PatternRecognitionbyCA.h:14
ntuplemaker.time
time
Definition: ntuplemaker.py:310
ticl::PatternRecognitionbyCA::mergeTrackstersTRK
void mergeTrackstersTRK(const std::vector< Trackster > &, const std::vector< reco::CaloCluster > &, std::vector< Trackster > &, std::unordered_map< int, std::vector< int >> &seedToTracksterAssociation) const
Definition: PatternRecognitionbyCA.cc:295
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
begin
#define begin
Definition: vmac.h:32
edm::ProductID
Definition: ProductID.h:27
ticl::Trackster
Definition: Trackster.h:19
jets_cff.outputNames
outputNames
Definition: jets_cff.py:294
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7