CMS 3D CMS Logo

EcalClustersGraph.cc
Go to the documentation of this file.
2 #include <cmath>
3 
4 using namespace std;
5 using namespace reco;
6 using namespace reco::DeepSCInputs;
7 
8 typedef std::shared_ptr<CalibratedPFCluster> CalibratedClusterPtr;
9 typedef std::vector<CalibratedClusterPtr> CalibratedClusterPtrVector;
10 
11 EcalClustersGraph::EcalClustersGraph(CalibratedClusterPtrVector clusters,
12  int nSeeds,
13  const CaloTopology* topology,
14  const CaloSubdetectorGeometry* ebGeom,
15  const CaloSubdetectorGeometry* eeGeom,
18  const SCProducerCache* cache)
19  : clusters_(clusters),
20  nSeeds_(nSeeds),
21  nCls_(clusters_.size()),
22  topology_(topology),
23  ebGeom_(ebGeom),
24  eeGeom_(eeGeom),
25  recHitsEB_(recHitsEB),
26  recHitsEE_(recHitsEE),
27  scProducerCache_(cache),
28  graphMap_(clusters.size()) {
29  // Prepare the batch size of the tensor inputs == number of windows
30  inputs_.clustersX.resize(nSeeds_);
31  inputs_.windowX.resize(nSeeds_);
32  inputs_.hitsX.resize(nSeeds_);
33  inputs_.isSeed.resize(nSeeds_);
34 
35  // Init the graph nodes
36  for (size_t i = 0; i < nCls_; i++) {
37  if (i < nSeeds_)
38  graphMap_.addNode(i, GraphMap::NodeCategory::kSeed);
39  else
40  graphMap_.addNode(i, GraphMap::NodeCategory::kNode);
41  }
42 
43  // Select the collection strategy from the config
44  if (scProducerCache_->config.collectionStrategy == "Cascade") {
45  strategy_ = GraphMap::CollectionStrategy::Cascade;
46  } else if (scProducerCache_->config.collectionStrategy == "CollectAndMerge") {
47  strategy_ = GraphMap::CollectionStrategy::CollectAndMerge;
48  } else if (scProducerCache_->config.collectionStrategy == "SeedsFirst") {
49  strategy_ = GraphMap::CollectionStrategy::SeedsFirst;
50  } else if (scProducerCache_->config.collectionStrategy == "CascadeHighest") {
51  strategy_ = GraphMap::CollectionStrategy::CascadeHighest;
52  } else {
53  edm::LogWarning("EcalClustersGraph") << "GraphMap::CollectionStrategy not recognized. Default to Cascade";
54  strategy_ = GraphMap::CollectionStrategy::Cascade;
55  }
56 
57  LogTrace("EcalClustersGraph") << "EcalClustersGraph created. nSeeds " << nSeeds_ << ", nClusters " << nCls_ << endl;
58 }
59 
60 std::array<int, 3> EcalClustersGraph::clusterPosition(const CaloCluster* cluster) const {
61  std::array<int, 3> coordinates;
62  int ieta = -999;
63  int iphi = -999;
64  int iz = -99;
65 
66  const math::XYZPoint& caloPos = cluster->position();
67  if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_BARREL) {
68  EBDetId eb_id(ebGeom_->getClosestCell(GlobalPoint(caloPos.x(), caloPos.y(), caloPos.z())));
69  ieta = eb_id.ieta();
70  iphi = eb_id.iphi();
71  iz = 0;
72  } else if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_ENDCAP) {
73  EEDetId ee_id(eeGeom_->getClosestCell(GlobalPoint(caloPos.x(), caloPos.y(), caloPos.z())));
74  ieta = ee_id.ix();
75  iphi = ee_id.iy();
76  if (ee_id.zside() < 0)
77  iz = -1;
78  if (ee_id.zside() > 0)
79  iz = 1;
80  }
81 
82  coordinates[0] = ieta;
83  coordinates[1] = iphi;
84  coordinates[2] = iz;
85  return coordinates;
86 }
87 
88 std::array<double, 3> EcalClustersGraph::dynamicWindow(double seedEta) const {
89  // The dEta-dPhi detector window dimension is chosen to that the algorithm is always larger than
90  // the Mustache dimension
91  std::array<double, 3> window;
92 
93  double eta = std::abs(seedEta);
94  double deta_down = 0.;
95  double deta_up = 0.;
96  double dphi = 0.;
97 
98  //deta_down
99  constexpr float deta_down_bins[2] = {2.1, 2.5};
100  if (eta < deta_down_bins[0])
101  deta_down = -0.075;
102  else if (eta >= deta_down_bins[0] && eta < deta_down_bins[1])
103  deta_down = -0.1875 * eta + 0.31875;
104  else if (eta >= deta_down_bins[1])
105  deta_down = -0.15;
106 
107  //deta_up
108  constexpr float deta_up_bins[4] = {0.1, 1.3, 1.7, 1.9};
109  if (eta < deta_up_bins[0])
110  deta_up = 0.075;
111  else if (eta >= deta_up_bins[0] && eta < deta_up_bins[1])
112  deta_up = 0.0758929 - 0.0178571 * eta + 0.0892857 * (eta * eta);
113  else if (eta >= deta_up_bins[1] && eta < deta_up_bins[2])
114  deta_up = 0.2;
115  else if (eta >= deta_up_bins[2] && eta < deta_up_bins[3])
116  deta_up = 0.625 - 0.25 * eta;
117  else if (eta >= deta_up_bins[3])
118  deta_up = 0.15;
119 
120  //dphi
121  constexpr float dphi_bins[2] = {1.9, 2.7};
122  if (eta < dphi_bins[0])
123  dphi = 0.6;
124  else if (eta >= dphi_bins[0] && eta < dphi_bins[1])
125  dphi = 1.075 - 0.25 * eta;
126  else if (eta >= dphi_bins[1])
127  dphi = 0.4;
128 
129  window[0] = deta_down;
130  window[1] = deta_up;
131  window[2] = dphi;
132 
133  return window;
134 }
135 
137  for (uint is = 0; is < nSeeds_; is++) {
138  const auto& seedLocal = clusterPosition((*clusters_[is]).ptr().get());
139  double seed_eta = clusters_[is]->eta();
140  double seed_phi = clusters_[is]->phi();
141  const auto& width = dynamicWindow(seed_eta);
142  // Add a self loop on the seed node
143  graphMap_.addEdge(is, is);
144 
145  // The graph associated to each seed includes only other seeds if they have a smaller energy.
146  // This is imposed to be consistent with the current trained model, which has been training on "non-overalapping windows".
147  // The effect of connecting all the seeds, and not only the smaller energy ones has been already tested: the reconstruction
148  // differences are negligible (tested with Cascade collection algo).
149  // In the next version of the training this requirement will be relaxed to have a model that fully matches the reconstruction
150  // mechanism in terms of overlapping seeds.
151  for (uint icl = is + 1; icl < nCls_; icl++) {
152  if (is == icl)
153  continue;
154  const auto& clusterLocal = clusterPosition((*clusters_[icl]).ptr().get());
155  double cl_eta = clusters_[icl]->eta();
156  double cl_phi = clusters_[icl]->phi();
157  double dphi = deltaPhi(seed_phi, cl_phi);
158  double deta = deltaEta(seed_eta, cl_eta);
159 
160  if (seedLocal[2] == clusterLocal[2] && deta >= width[0] && deta <= width[1] && std::abs(dphi) <= width[2]) {
161  graphMap_.addEdge(is, icl);
162  }
163  }
164  }
165 }
166 
167 std::vector<std::vector<float>> EcalClustersGraph::fillHits(const CaloCluster* cluster) const {
168  const std::vector<std::pair<DetId, float>>& hitsAndFractions = cluster->hitsAndFractions();
169  std::vector<std::vector<float>> out(hitsAndFractions.size());
170  if (hitsAndFractions.empty()) {
171  edm::LogError("EcalClustersGraph") << "No hits in cluster!!";
172  }
173  // Map containing the available features for the rechits
174  DeepSCInputs::FeaturesMap rechitsFeatures;
175  for (unsigned int i = 0; i < hitsAndFractions.size(); i++) {
176  rechitsFeatures.clear();
177  if (hitsAndFractions[i].first.subdetId() == EcalBarrel) {
178  double energy = (*recHitsEB_->find(hitsAndFractions[i].first)).energy();
179  EBDetId eb_id(hitsAndFractions[i].first);
180  rechitsFeatures["ieta"] = eb_id.ieta(); //ieta
181  rechitsFeatures["iphi"] = eb_id.iphi(); //iphi
182  rechitsFeatures["iz"] = 0.; //iz
183  rechitsFeatures["en_withfrac"] = energy * hitsAndFractions[i].second; //energy * fraction
184  } else if (hitsAndFractions[i].first.subdetId() == EcalEndcap) {
185  double energy = (*recHitsEE_->find(hitsAndFractions[i].first)).energy();
186  EEDetId ee_id(hitsAndFractions[i].first);
187  rechitsFeatures["ieta"] = ee_id.ix(); //ix
188  rechitsFeatures["iphi"] = ee_id.iy(); //iy
189  if (ee_id.zside() < 0)
190  rechitsFeatures["iz"] = -1.; //iz
191  if (ee_id.zside() > 0)
192  rechitsFeatures["iz"] = +1.; //iz
193  rechitsFeatures["en_withfrac"] = energy * hitsAndFractions[i].second; //energy * fraction
194  } else {
195  edm::LogError("EcalClustersGraph") << "Rechit is not either EB or EE!!";
196  }
197  // Use the method in DeepSCGraphEvaluation to get only the requested variables and possible a rescaling
198  // (depends on configuration)
199  out[i] = scProducerCache_->deepSCEvaluator->getScaledInputs(rechitsFeatures,
200  scProducerCache_->deepSCEvaluator->inputFeaturesHits);
201  }
202  return out;
203 }
204 
206  const CaloCluster* cluster) const {
207  DeepSCInputs::FeaturesMap clFeatures;
208  const auto& clusterLocal = clusterPosition(cluster);
209  double cl_energy = cluster->energy();
210  double cl_eta = cluster->eta();
211  double cl_phi = cluster->phi();
212  double seed_energy = seed->energy();
213  double seed_eta = seed->eta();
214  double seed_phi = seed->phi();
215  clFeatures["cl_energy"] = cl_energy; //cl_energy
216  clFeatures["cl_et"] = cl_energy / std::cosh(cl_eta); //cl_et
217  clFeatures["cl_eta"] = cl_eta; //cl_eta
218  clFeatures["cl_phi"] = cl_phi; //cl_phi
219  clFeatures["cl_ieta"] = clusterLocal[0]; //cl_ieta/ix
220  clFeatures["cl_iphi"] = clusterLocal[1]; //cl_iphi/iy
221  clFeatures["cl_iz"] = clusterLocal[2]; //cl_iz
222  clFeatures["cl_seed_dEta"] = deltaEta(seed_eta, cl_eta); //cl_dEta
223  clFeatures["cl_seed_dPhi"] = deltaPhi(seed_phi, cl_phi); //cl_dPhi
224  clFeatures["cl_seed_dEnergy"] = seed_energy - cl_energy; //cl_dEnergy
225  clFeatures["cl_seed_dEt"] = (seed_energy / std::cosh(seed_eta)) - (cl_energy / std::cosh(cl_eta)); //cl_dEt
226  clFeatures["cl_nxtals"] = cluster->hitsAndFractions().size(); // nxtals
227  return clFeatures;
228 }
229 
231  const std::vector<DeepSCInputs::FeaturesMap>& clusters) const {
232  size_t nCls = clusters.size();
233  std::map<std::string, float> min;
234  std::map<std::string, float> max;
235  std::map<std::string, float> avg;
236  for (const auto& clFeatures : clusters) {
237  for (auto const& [key, val] : clFeatures) {
238  avg[key] += (val / nCls);
239  if (val < min[key])
240  min[key] = val;
241  if (val > max[key])
242  max[key] = val;
243  }
244  }
245  DeepSCInputs::FeaturesMap windFeatures;
246  for (auto const& el : clusters.front()) {
247  windFeatures["max_" + el.first] = max[el.first];
248  windFeatures["min_" + el.first] = min[el.first];
249  windFeatures["avg_" + el.first] = avg[el.first];
250  }
251  return windFeatures;
252 }
253 
254 std::pair<double, double> EcalClustersGraph::computeCovariances(const CaloCluster* cluster) {
255  double numeratorEtaWidth = 0;
256  double numeratorPhiWidth = 0;
257  double denominator = cluster->energy();
258  double clEta = cluster->position().eta();
259  double clPhi = cluster->position().phi();
260  std::shared_ptr<const CaloCellGeometry> this_cell;
262 
263  const std::vector<std::pair<DetId, float>>& detId = cluster->hitsAndFractions();
264  // Loop over recHits associated with the given SuperCluster
265  for (const auto& hit : detId) {
266  if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_BARREL) {
267  rHit = recHitsEB_->find(hit.first);
268  if (rHit == recHitsEB_->end()) {
269  continue;
270  }
271  this_cell = ebGeom_->getGeometry(rHit->id());
272  } else if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_ENDCAP) {
273  rHit = recHitsEE_->find(hit.first);
274  if (rHit == recHitsEE_->end()) {
275  continue;
276  }
277  this_cell = eeGeom_->getGeometry(rHit->id());
278  } else {
279  continue;
280  }
281 
282  GlobalPoint position = this_cell->getPosition();
283  //take into account energy fractions
284  double energyHit = rHit->energy() * hit.second;
285  //form differences
286  double dPhi = deltaPhi(position.phi(), clPhi);
287  double dEta = position.eta() - clEta;
288  if (energyHit > 0) {
289  numeratorEtaWidth += energyHit * dEta * dEta;
290  numeratorPhiWidth += energyHit * dPhi * dPhi;
291  }
292  }
293  double etaWidth = sqrt(numeratorEtaWidth / denominator);
294  double phiWidth = sqrt(numeratorPhiWidth / denominator);
295 
296  return std::make_pair(etaWidth, phiWidth);
297 }
298 
299 std::vector<double> EcalClustersGraph::computeShowerShapes(const CaloCluster* cluster, bool full5x5 = false) {
300  std::vector<double> showerVars_;
301  showerVars_.resize(8);
302  widths_ = computeCovariances(cluster);
303  float e1 = 1.;
304  float e4 = 0.;
305  float r9 = 0.;
306 
307  if (full5x5) {
308  if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_BARREL) {
315  r9 = noZS::EcalClusterTools::e3x3(*cluster, recHitsEB_, topology_) / cluster->energy(); //r9
316 
317  } else if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_ENDCAP) {
324  r9 = noZS::EcalClusterTools::e3x3(*cluster, recHitsEE_, topology_) / cluster->energy(); //r9
325  }
326  } else {
327  if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_BARREL) {
328  locCov_ = EcalClusterTools::localCovariances(*cluster, recHitsEB_, topology_);
329  e1 = EcalClusterTools::eMax(*cluster, recHitsEB_);
330  e4 = EcalClusterTools::eTop(*cluster, recHitsEB_, topology_) +
331  EcalClusterTools::eRight(*cluster, recHitsEB_, topology_) +
332  EcalClusterTools::eBottom(*cluster, recHitsEB_, topology_) +
333  EcalClusterTools::eLeft(*cluster, recHitsEB_, topology_);
334  r9 = EcalClusterTools::e3x3(*cluster, recHitsEB_, topology_) / cluster->energy(); //r9
335  } else if (PFLayer::fromCaloID(cluster->caloID()) == PFLayer::ECAL_ENDCAP) {
336  locCov_ = EcalClusterTools::localCovariances(*cluster, recHitsEE_, topology_);
337  e1 = EcalClusterTools::eMax(*cluster, recHitsEE_);
338  e4 = EcalClusterTools::eTop(*cluster, recHitsEE_, topology_) +
339  EcalClusterTools::eRight(*cluster, recHitsEE_, topology_) +
340  EcalClusterTools::eBottom(*cluster, recHitsEE_, topology_) +
341  EcalClusterTools::eLeft(*cluster, recHitsEE_, topology_);
342  r9 = EcalClusterTools::e3x3(*cluster, recHitsEE_, topology_) / cluster->energy();
343  }
344  }
345  showerVars_[0] = r9;
346  showerVars_[1] = sqrt(locCov_[0]); //sigmaietaieta
347  showerVars_[2] = locCov_[1]; //sigmaietaiphi
348  showerVars_[3] = (!edm::isFinite(locCov_[2])) ? 0. : sqrt(locCov_[2]); //sigmaiphiiphi
349  showerVars_[4] = (e1 != 0.) ? 1. - e4 / e1 : -999.; //swiss_cross
350  showerVars_[5] = cluster->hitsAndFractions().size(); //nXtals
351  showerVars_[6] = widths_.first; //etaWidth
352  showerVars_[7] = widths_.second; //phiWidth
353 
354  return showerVars_;
355 }
356 
358  LogDebug("EcalClustersGraph") << "Fill tensorflow input vector";
359  const auto& deepSCEval = scProducerCache_->deepSCEvaluator;
360  // Reserving the batch dimension
361  inputs_.clustersX.reserve(nSeeds_);
362  inputs_.hitsX.reserve(nSeeds_);
363  inputs_.windowX.reserve(nSeeds_);
364  inputs_.isSeed.reserve(nSeeds_);
365 
366  // Looping on all the seeds (window)
367  for (uint is = 0; is < nSeeds_; is++) {
368  const auto seedPointer = (*clusters_[is]).ptr().get();
369  std::vector<DeepSCInputs::FeaturesMap> unscaledClusterFeatures;
370  const auto& outEdges = graphMap_.getOutEdges(is);
371  size_t ncls = outEdges.size();
372  // Reserve the vector size
373  inputs_.clustersX[is].reserve(ncls);
374  inputs_.hitsX[is].reserve(ncls);
375  inputs_.isSeed[is].reserve(ncls);
376  unscaledClusterFeatures.reserve(ncls);
377  // Loop on all the clusters
378  for (const auto ic : outEdges) {
379  LogTrace("EcalClustersGraph") << "seed: " << is << ", out edge --> " << ic;
380  const auto clPointer = (*clusters_[ic]).ptr().get();
381  const auto& clusterFeatures = computeVariables(seedPointer, clPointer);
382  for (const auto& [key, val] : clusterFeatures) {
383  LogTrace("EcalCluster") << key << "=" << val;
384  }
385  unscaledClusterFeatures.push_back(clusterFeatures);
386  // Select and scale only the requested variables for the tensorflow model input
387  inputs_.clustersX[is].push_back(deepSCEval->getScaledInputs(clusterFeatures, deepSCEval->inputFeaturesClusters));
388  // The scaling and feature selection on hits is performed inside the function for each hit
389  inputs_.hitsX[is].push_back(fillHits(clPointer));
390  inputs_.isSeed[is].push_back(ic == is);
391  }
392  // For window we need the unscaled cluster features and then we select them
393  inputs_.windowX[is] =
394  deepSCEval->getScaledInputs(computeWindowVariables(unscaledClusterFeatures), deepSCEval->inputFeaturesWindows);
395  }
396  LogTrace("EcalClustersGraph") << "N. Windows: " << inputs_.clustersX.size();
397 }
398 
400  // Evaluate model
401  const auto& scores = scProducerCache_->deepSCEvaluator->evaluate(inputs_);
402  for (uint i = 0; i < nSeeds_; ++i) {
403  uint k = 0;
404  LogTrace("EcalClustersGraph") << "Score) seed: " << i << ":";
405  for (auto const& j : graphMap_.getOutEdges(i)) {
406  // Fill the scores from seed --> node (i --> j)
407  // Not symmetrically, in order to save multiple values for seeds in other
408  // seeds windows.
409  graphMap_.setAdjMatrix(i, j, scores[i][k]);
410  LogTrace("EcalClustersGraph") << "\t" << i << "-->" << j << ": " << scores[i][k];
411  k++;
412  }
413  }
414 }
415 
417  // Simple global threshold for the moment
418  threshold_ = 0.5;
419 }
420 
422  // Collect the final superClusters as subgraphs
424 }
425 
428  const auto& finalSuperClusters_ = graphMap_.getGraphOutput();
429  for (const auto& [is, cls] : finalSuperClusters_) {
431  CalibratedClusterPtrVector clusters_inWindow;
432  for (const auto& ic : cls) {
433  clusters_inWindow.push_back(clusters_[ic]);
434  }
435  finalWindows_.push_back({seed, clusters_inWindow});
436  }
437  return finalWindows_;
438 }
size
Write out results.
reco::DeepSCConfiguration config
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
std::array< double, 3 > dynamicWindow(double seedEta) const
std::vector< std::vector< float > > windowX
const GraphOutput & getGraphOutput()
Definition: GraphMap.h:60
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
const CaloTopology * topology_
const EcalRecHitCollection * recHitsEB_
const EcalRecHitCollection * recHitsEE_
reco::DeepSCInputs::Inputs inputs_
EcalGraphOutput getGraphOutput()
static float eMax(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits)
DeepSCInputs::FeaturesMap computeWindowVariables(const std::vector< DeepSCInputs::FeaturesMap > &clusters) const
const reco::SCProducerCache * scProducerCache_
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
std::pair< double, double > widths_
int ix() const
Definition: EEDetId.h:77
std::vector< EcalRecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * eeGeom_
reco::GraphMap::CollectionStrategy strategy_
void addNode(const uint index, const NodeCategory category)
Definition: GraphMap.cc:15
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
Log< level::Error, false > LogError
constexpr bool isFinite(T x)
const CaloID & caloID() const
Definition: CaloCluster.h:201
std::vector< double > computeShowerShapes(const CaloCluster *cluster, bool full5x5)
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:184
std::array< float, 3 > locCov_
#define LogTrace(id)
double deltaEta(double seed_eta, double cluster_eta) const
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
std::map< std::string, double > FeaturesMap
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
static std::array< float, 3 > localCovariances(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology, float w0=EgammaLocalCovParamDefaults::kRelEnCut, const EcalPFRecHitThresholds *thresholds=nullptr, float multEB=0.0, float multEE=0.0)
const std::vector< uint > & getOutEdges(const uint i) const
Definition: GraphMap.cc:41
void collectNodes(GraphMap::CollectionStrategy strategy, float threshold)
Definition: GraphMap.cc:97
std::shared_ptr< CalibratedPFCluster > CalibratedClusterPtr
T sqrt(T t)
Definition: SSEVec.h:19
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void setAdjMatrix(const uint i, const uint j, const float score)
Definition: GraphMap.cc:34
static float eBottom(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
DeepSCInputs::FeaturesMap computeVariables(const CaloCluster *seed, const CaloCluster *cluster) const
std::array< int, 3 > clusterPosition(const CaloCluster *cluster) const
const CaloSubdetectorGeometry * ebGeom_
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual DetId getClosestCell(const GlobalPoint &r) const
const_iterator end() const
double energy() const
cluster energy
Definition: CaloCluster.h:149
static float eTop(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::vector< std::vector< std::vector< float > > > clustersX
std::vector< std::pair< CalibratedClusterPtr, CalibratedClusterPtrVector > > EcalGraphOutput
void addEdge(const uint i, const uint j)
Definition: GraphMap.cc:26
int zside() const
Definition: EEDetId.h:71
std::vector< std::vector< float > > fillHits(const CaloCluster *cluster) const
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:18
iterator find(key_type k)
fixed size matrix
CalibratedClusterPtrVector clusters_
static int position[264][3]
Definition: ReadPGInfo.cc:289
def cache(function)
Definition: utilities.py:3
static Layer fromCaloID(const reco::CaloID &id)
Definition: PFLayer.cc:38
static float eRight(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
static float e3x3(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
std::vector< std::vector< bool > > isSeed
Log< level::Warning, false > LogWarning
static float eLeft(const reco::BasicCluster &cluster, const EcalRecHitCollection *recHits, const CaloTopology *topology)
std::unique_ptr< const DeepSCGraphEvaluation > deepSCEvaluator
std::vector< std::vector< std::vector< std::vector< float > > > > hitsX
std::pair< double, double > computeCovariances(const CaloCluster *cluster)
std::vector< CalibratedClusterPtr > CalibratedClusterPtrVector
int iy() const
Definition: EEDetId.h:83
#define LogDebug(id)