CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
ClusterShapeAlgo Class Reference

#include <ClusterShapeAlgo.h>

Public Member Functions

reco::ClusterShape Calculate (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, const CaloSubdetectorTopology *topology)
 
 ClusterShapeAlgo ()
 
 ClusterShapeAlgo (const edm::ParameterSet &par)
 

Private Types

enum  { Eta, Phi }
 

Private Member Functions

double absZernikeMoment (const reco::BasicCluster &passedCluster, int n, int m, double R0=6.6)
 
double calc_AbsZernikeMoment (const reco::BasicCluster &passedCluster, int n, int m, double R0)
 
void Calculate_2ndEnergy (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits)
 
void Calculate_BarrelBasketEnergyFraction (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const int EtaPhi, const CaloSubdetectorGeometry *geometry)
 
void Calculate_ComplexZernikeMoments (const reco::BasicCluster &passedCluster)
 
void Calculate_Covariances (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
 
void Calculate_e2x2 ()
 
void Calculate_e2x5Bottom ()
 
void Calculate_e2x5Left ()
 
void Calculate_e2x5Right ()
 
void Calculate_e2x5Top ()
 
void Calculate_e3x2 ()
 
void Calculate_e3x3 ()
 
void Calculate_e4x4 ()
 
void Calculate_e5x5 ()
 
void Calculate_EnergyDepTopology (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, bool logW=true)
 
void Calculate_lat (const reco::BasicCluster &passedCluster)
 
void Calculate_Polynomials (double rho)
 
void Calculate_TopEnergy (const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits)
 
void Create_Map (const EcalRecHitCollection *hits, const CaloSubdetectorTopology *topology)
 
double f00 (double r)
 
double f11 (double r)
 
double f20 (double r)
 
double f22 (double r)
 
double f31 (double r)
 
double f33 (double r)
 
double f40 (double r)
 
double f42 (double r)
 
double f44 (double r)
 
double f51 (double r)
 
double f53 (double r)
 
double f55 (double r)
 
double factorial (int n) const
 
double fast_AbsZernikeMoment (const reco::BasicCluster &passedCluster, int n, int m, double R0)
 

Private Attributes

double A20_
 
double A42_
 
double covEtaEta_
 
double covEtaPhi_
 
double covPhiPhi_
 
double e2nd_
 
DetId e2ndId_
 
double e2x2_
 
int e2x2_Diagonal_X_
 
int e2x2_Diagonal_Y_
 
double e2x5Bottom_
 
double e2x5Left_
 
double e2x5Right_
 
double e2x5Top_
 
double e3x2_
 
double e3x2Ratio_
 
double e3x3_
 
double e4x4_
 
double e5x5_
 
double eMax_
 
DetId eMaxId_
 
std::vector< double > energyBasketFractionEta_
 
std::vector< double > energyBasketFractionPhi_
 
std::vector< EcalClusterEnergyDepositionenergyDistribution_
 
std::pair< DetId, double > energyMap_ [5][5]
 
double etaLat_
 
std::vector< double > fcn_
 
double lat_
 
edm::ParameterSet parameterSet_
 
double phiLat_
 

Detailed Description

calculates and creates a ClusterShape object

Author
Michael A. Balazs, UVa

Definition at line 35 of file ClusterShapeAlgo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
Eta 
Phi 

Definition at line 111 of file ClusterShapeAlgo.h.

111 { Eta, Phi };

Constructor & Destructor Documentation

◆ ClusterShapeAlgo() [1/2]

ClusterShapeAlgo::ClusterShapeAlgo ( const edm::ParameterSet par)

Definition at line 19 of file ClusterShapeAlgo.cc.

19 : parameterSet_(par) {}

◆ ClusterShapeAlgo() [2/2]

ClusterShapeAlgo::ClusterShapeAlgo ( )
inline

Definition at line 38 of file ClusterShapeAlgo.h.

38 {};

Member Function Documentation

◆ absZernikeMoment()

double ClusterShapeAlgo::absZernikeMoment ( const reco::BasicCluster passedCluster,
int  n,
int  m,
double  R0 = 6.6 
)
private

Definition at line 525 of file ClusterShapeAlgo.cc.

525  {
526  // 1. Check if n,m are correctly
527  if ((m > n) || ((n - m) % 2 != 0) || (n < 0) || (m < 0))
528  return -1;
529 
530  // 2. Check if n,R0 are within validity Range :
531  // n>20 or R0<2.19cm just makes no sense !
532  if ((n > 20) || (R0 <= 2.19))
533  return -1;
534  if (n <= 5)
535  return fast_AbsZernikeMoment(passedCluster, n, m, R0);
536  else
537  return calc_AbsZernikeMoment(passedCluster, n, m, R0);
538 }

References calc_AbsZernikeMoment(), fast_AbsZernikeMoment(), visualization-live-secondInstance_cfg::m, dqmiodumpmetadata::n, and HLT_FULL_cff::R0.

Referenced by Calculate_ComplexZernikeMoments().

◆ calc_AbsZernikeMoment()

double ClusterShapeAlgo::calc_AbsZernikeMoment ( const reco::BasicCluster passedCluster,
int  n,
int  m,
double  R0 
)
private

Definition at line 588 of file ClusterShapeAlgo.cc.

588  {
589  double r, ph, e, Re = 0, Im = 0, f_nm, result;
590  double TotalEnergy = passedCluster.energy();
591  int clusterSize = energyDistribution_.size();
592  if (clusterSize < 3)
593  return 0.0;
594 
595  for (int i = 0; i < clusterSize; i++) {
596  r = energyDistribution_[i].r / R0;
597  if (r < 1) {
598  ph = (energyDistribution_[i]).phi;
599  e = energyDistribution_[i].deposited_energy;
600  f_nm = 0;
601  for (int s = 0; s <= (n - m) / 2; s++) {
602  if (s % 2 == 0) {
603  f_nm = f_nm + factorial(n - s) * pow(r, (double)(n - 2 * s)) /
604  (factorial(s) * factorial((n + m) / 2 - s) * factorial((n - m) / 2 - s));
605  } else {
606  f_nm = f_nm - factorial(n - s) * pow(r, (double)(n - 2 * s)) /
607  (factorial(s) * factorial((n + m) / 2 - s) * factorial((n - m) / 2 - s));
608  }
609  }
610  Re = Re + e / TotalEnergy * f_nm * cos((double)m * ph);
611  Im = Im - e / TotalEnergy * f_nm * sin((double)m * ph);
612  }
613  }
614  result = sqrt(Re * Re + Im * Im);
615 
616  return result;
617 }

References funct::cos(), MillePedeFileConverter_cfg::e, reco::CaloCluster::energy(), energyDistribution_, factorial(), mps_fire::i, visualization-live-secondInstance_cfg::m, dqmiodumpmetadata::n, phi, funct::pow(), alignCSCRings::r, HLT_FULL_cff::R0, mps_fire::result, alignCSCRings::s, funct::sin(), and mathSSE::sqrt().

Referenced by absZernikeMoment().

◆ Calculate()

reco::ClusterShape ClusterShapeAlgo::Calculate ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits,
const CaloSubdetectorGeometry geometry,
const CaloSubdetectorTopology topology 
)

Definition at line 21 of file ClusterShapeAlgo.cc.

24  {
25  Calculate_TopEnergy(passedCluster, hits);
26  Calculate_2ndEnergy(passedCluster, hits);
37  Calculate_Covariances(passedCluster, hits, geometry);
40  Calculate_EnergyDepTopology(passedCluster, hits, geometry, true);
41  Calculate_lat(passedCluster);
42  Calculate_ComplexZernikeMoments(passedCluster);
43 
45  covEtaPhi_,
46  covPhiPhi_,
47  eMax_,
48  eMaxId_,
49  e2nd_,
50  e2ndId_,
51  e2x2_,
52  e3x2_,
53  e3x3_,
54  e4x4_,
55  e5x5_,
56  e2x5Right_,
57  e2x5Left_,
58  e2x5Top_,
60  e3x2Ratio_,
61  lat_,
62  etaLat_,
63  phiLat_,
64  A20_,
65  A42_,
68 }

References A20_, A42_, Calculate_2ndEnergy(), Calculate_BarrelBasketEnergyFraction(), Calculate_ComplexZernikeMoments(), Calculate_Covariances(), Calculate_e2x2(), Calculate_e2x5Bottom(), Calculate_e2x5Left(), Calculate_e2x5Right(), Calculate_e2x5Top(), Calculate_e3x2(), Calculate_e3x3(), Calculate_e4x4(), Calculate_e5x5(), Calculate_EnergyDepTopology(), Calculate_lat(), Calculate_TopEnergy(), covEtaEta_, covEtaPhi_, covPhiPhi_, Create_Map(), e2nd_, e2ndId_, e2x2_, e2x5Bottom_, e2x5Left_, e2x5Right_, e2x5Top_, e3x2_, e3x2Ratio_, e3x3_, e4x4_, e5x5_, eMax_, eMaxId_, energyBasketFractionEta_, energyBasketFractionPhi_, Eta, etaLat_, hfClusterShapes_cfi::hits, lat_, Phi, phiLat_, and ecaldqm::topology().

Referenced by IslandClusterProducer::clusterizeECALPart(), CosmicClusterProducer::clusterizeECALPart(), and Pi0FixedMassWindowCalibration::duringLoop().

◆ Calculate_2ndEnergy()

void ClusterShapeAlgo::Calculate_2ndEnergy ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits 
)
private

Definition at line 94 of file ClusterShapeAlgo.cc.

94  {
95  double e2nd = 0;
96  DetId e2ndId(0);
97 
98  const std::vector<std::pair<DetId, float> >& clusterDetIds = passedCluster.hitsAndFractions();
99 
100  EcalRecHit testEcalRecHit;
101 
102  for (auto const& posCurrent : clusterDetIds) {
103  if ((posCurrent.first != DetId(0)) && (hits->find(posCurrent.first) != hits->end())) {
104  EcalRecHitCollection::const_iterator itt = hits->find(posCurrent.first);
105  testEcalRecHit = *itt;
106 
107  if (testEcalRecHit.energy() * posCurrent.second > e2nd && testEcalRecHit.id() != eMaxId_) {
108  e2nd = testEcalRecHit.energy() * posCurrent.second;
109  e2ndId = testEcalRecHit.id();
110  }
111  }
112  }
113 
114  e2nd_ = e2nd;
115  e2ndId_ = e2ndId;
116 }

References e2nd_, e2ndId_, eMaxId_, EcalRecHit::energy(), hfClusterShapes_cfi::hits, reco::CaloCluster::hitsAndFractions(), and EcalRecHit::id().

Referenced by Calculate().

◆ Calculate_BarrelBasketEnergyFraction()

void ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits,
const int  EtaPhi,
const CaloSubdetectorGeometry geometry 
)
private

Definition at line 406 of file ClusterShapeAlgo.cc.

409  {
410  if ((hits == nullptr) || (((*hits)[0]).id().subdetId() != EcalBarrel)) {
411  //std::cout << "No basket correction if no hits or for endacap!" << std::endl;
412  return;
413  }
414 
415  std::map<int, double> indexedBasketEnergy;
416  const std::vector<std::pair<DetId, float> >& clusterDetIds = passedCluster.hitsAndFractions();
417  const EcalBarrelGeometry* subDetGeometry = dynamic_cast<const EcalBarrelGeometry*>(geometry);
418 
419  for (auto const& posCurrent : clusterDetIds) {
420  int basketIndex = 999;
421 
422  if (EtaPhi == Eta) {
423  int unsignedIEta = abs(EBDetId(posCurrent.first).ieta());
424  std::vector<int> etaBasketSize = subDetGeometry->getEtaBaskets();
425 
426  for (unsigned int i = 0; i < etaBasketSize.size(); i++) {
427  unsignedIEta -= etaBasketSize[i];
428  if (unsignedIEta - 1 < 0) {
429  basketIndex = i;
430  break;
431  }
432  }
433  basketIndex = (basketIndex + 1) * (EBDetId(posCurrent.first).ieta() > 0 ? 1 : -1);
434 
435  } else if (EtaPhi == Phi) {
436  int halfNumBasketInPhi = (EBDetId::MAX_IPHI - EBDetId::MIN_IPHI + 1) / subDetGeometry->getBasketSizeInPhi() / 2;
437 
438  basketIndex = (EBDetId(posCurrent.first).iphi() - 1) / subDetGeometry->getBasketSizeInPhi() -
439  (EBDetId((clusterDetIds[0]).first).iphi() - 1) / subDetGeometry->getBasketSizeInPhi();
440 
441  if (basketIndex >= halfNumBasketInPhi)
442  basketIndex -= 2 * halfNumBasketInPhi;
443  else if (basketIndex < -1 * halfNumBasketInPhi)
444  basketIndex += 2 * halfNumBasketInPhi;
445 
446  } else
447  throw(std::runtime_error("\n\nOh No! Calculate_BarrelBasketEnergyFraction called on invalid index.\n\n"));
448 
449  indexedBasketEnergy[basketIndex] += (hits->find(posCurrent.first))->energy();
450  }
451 
452  std::vector<double> energyFraction;
453  for (std::map<int, double>::iterator posCurrent = indexedBasketEnergy.begin();
454  posCurrent != indexedBasketEnergy.end();
455  posCurrent++) {
456  energyFraction.push_back(indexedBasketEnergy[posCurrent->first] / passedCluster.energy());
457  }
458 
459  switch (EtaPhi) {
460  case Eta:
461  energyBasketFractionEta_ = energyFraction;
462  break;
463  case Phi:
464  energyBasketFractionPhi_ = energyFraction;
465  break;
466  }
467 }

References funct::abs(), EcalBarrel, HCALHighEnergyHPDFilter_cfi::energy, reco::CaloCluster::energy(), energyBasketFractionEta_, energyBasketFractionPhi_, Eta, dqmdumpme::first, EcalBarrelGeometry::getBasketSizeInPhi(), EcalBarrelGeometry::getEtaBaskets(), hfClusterShapes_cfi::hits, reco::CaloCluster::hitsAndFractions(), mps_fire::i, EBDetId::ieta(), EBDetId::iphi(), EBDetId::MAX_IPHI, EBDetId::MIN_IPHI, and Phi.

Referenced by Calculate().

◆ Calculate_ComplexZernikeMoments()

void ClusterShapeAlgo::Calculate_ComplexZernikeMoments ( const reco::BasicCluster passedCluster)
private

Definition at line 518 of file ClusterShapeAlgo.cc.

518  {
519  // Calculate only the moments which go into the default cluster shape
520  // (moments with m>=2 are the only sensitive to azimuthal shape)
521  A20_ = absZernikeMoment(passedCluster, 2, 0);
522  A42_ = absZernikeMoment(passedCluster, 4, 2);
523 }

References A20_, A42_, and absZernikeMoment().

Referenced by Calculate().

◆ Calculate_Covariances()

void ClusterShapeAlgo::Calculate_Covariances ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits,
const CaloSubdetectorGeometry geometry 
)
private

Definition at line 340 of file ClusterShapeAlgo.cc.

342  {
343  if (e5x5_ > 0.) {
344  double w0_ = parameterSet_.getParameter<double>("W0");
345 
346  // first find energy-weighted mean position - doing it when filling the energy map might save time
347  math::XYZVector meanPosition(0.0, 0.0, 0.0);
348  for (int i = 0; i < 5; ++i) {
349  for (int j = 0; j < 5; ++j) {
350  DetId id = energyMap_[i][j].first;
351  if (id != DetId(0)) {
352  GlobalPoint positionGP = geometry->getGeometry(id)->getPosition();
353  math::XYZVector position(positionGP.x(), positionGP.y(), positionGP.z());
354  meanPosition = meanPosition + energyMap_[i][j].second * position;
355  }
356  }
357  }
358 
359  meanPosition /= e5x5_;
360 
361  // now we can calculate the covariances
362  double numeratorEtaEta = 0;
363  double numeratorEtaPhi = 0;
364  double numeratorPhiPhi = 0;
365  double denominator = 0;
366 
367  for (int i = 0; i < 5; ++i) {
368  for (int j = 0; j < 5; ++j) {
369  DetId id = energyMap_[i][j].first;
370  if (id != DetId(0)) {
371  GlobalPoint position = geometry->getGeometry(id)->getPosition();
372 
373  double dPhi = position.phi() - meanPosition.phi();
374  if (dPhi > +Geom::pi()) {
375  dPhi = Geom::twoPi() - dPhi;
376  }
377  if (dPhi < -Geom::pi()) {
378  dPhi = Geom::twoPi() + dPhi;
379  }
380 
381  double dEta = position.eta() - meanPosition.eta();
382  double w = 0.;
383  if (energyMap_[i][j].second > 0.)
384  w = std::max(0.0, w0_ + log(energyMap_[i][j].second / e5x5_));
385 
386  denominator += w;
387  numeratorEtaEta += w * dEta * dEta;
388  numeratorEtaPhi += w * dEta * dPhi;
389  numeratorPhiPhi += w * dPhi * dPhi;
390  }
391  }
392  }
393 
394  covEtaEta_ = numeratorEtaEta / denominator;
395  covEtaPhi_ = numeratorEtaPhi / denominator;
396  covPhiPhi_ = numeratorPhiPhi / denominator;
397  } else {
398  // Warn the user if there was no energy in the cells and return zeroes.
399  // std::cout << "\ClusterShapeAlgo::Calculate_Covariances: no energy in supplied cells.\n";
400  covEtaEta_ = 0;
401  covEtaPhi_ = 0;
402  covPhiPhi_ = 0;
403  }
404 }

References covEtaEta_, covEtaPhi_, covPhiPhi_, HLTTauDQMOffline_cfi::denominator, HLT_FULL_cff::dEta, HLT_FULL_cff::dPhi, e5x5_, energyMap_, edm::ParameterSet::getParameter(), mps_fire::i, dqmiolumiharvest::j, dqm-mbProfile::log, SiStripPI::max, parameterSet_, Geom::pi(), position, edm::second(), Geom::twoPi(), w, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by Calculate().

◆ Calculate_e2x2()

void ClusterShapeAlgo::Calculate_e2x2 ( )
private

Definition at line 136 of file ClusterShapeAlgo.cc.

136  {
137  double e2x2Max = 0;
138  double e2x2Test = 0;
139 
140  int deltaX = 0, deltaY = 0;
141 
142  for (int corner = 0; corner < 4; corner++) {
143  switch (corner) {
144  case 0:
145  deltaX = -1;
146  deltaY = -1;
147  break;
148  case 1:
149  deltaX = -1;
150  deltaY = 1;
151  break;
152  case 2:
153  deltaX = 1;
154  deltaY = -1;
155  break;
156  case 3:
157  deltaX = 1;
158  deltaY = 1;
159  break;
160  }
161 
162  e2x2Test = energyMap_[2][2].second;
163  e2x2Test += energyMap_[2 + deltaY][2].second;
164  e2x2Test += energyMap_[2][2 + deltaX].second;
165  e2x2Test += energyMap_[2 + deltaY][2 + deltaX].second;
166 
167  if (e2x2Test > e2x2Max) {
168  e2x2Max = e2x2Test;
169  e2x2_Diagonal_X_ = 2 + deltaX;
170  e2x2_Diagonal_Y_ = 2 + deltaY;
171  }
172  }
173 
174  e2x2_ = e2x2Max;
175 }

References distTCMET_cfi::corner, e2x2_, e2x2_Diagonal_X_, e2x2_Diagonal_Y_, and energyMap_.

Referenced by Calculate().

◆ Calculate_e2x5Bottom()

void ClusterShapeAlgo::Calculate_e2x5Bottom ( )
private

Definition at line 316 of file ClusterShapeAlgo.cc.

316  {
317  double e2x5B = 0.0;
318  for (int i = 0; i <= 4; i++) {
319  for (int j = 0; j <= 4; j++) {
320  if (i > 2) {
321  e2x5B += energyMap_[i][j].second;
322  }
323  }
324  }
325  e2x5Bottom_ = e2x5B;
326 }

References e2x5Bottom_, energyMap_, mps_fire::i, and dqmiolumiharvest::j.

Referenced by Calculate().

◆ Calculate_e2x5Left()

void ClusterShapeAlgo::Calculate_e2x5Left ( )
private

Definition at line 304 of file ClusterShapeAlgo.cc.

304  {
305  double e2x5L = 0.0;
306  for (int i = 0; i <= 4; i++) {
307  for (int j = 0; j <= 4; j++) {
308  if (j < 2) {
309  e2x5L += energyMap_[i][j].second;
310  }
311  }
312  }
313  e2x5Left_ = e2x5L;
314 }

References e2x5Left_, energyMap_, mps_fire::i, and dqmiolumiharvest::j.

Referenced by Calculate().

◆ Calculate_e2x5Right()

void ClusterShapeAlgo::Calculate_e2x5Right ( )
private

Definition at line 292 of file ClusterShapeAlgo.cc.

292  {
293  double e2x5R = 0.0;
294  for (int i = 0; i <= 4; i++) {
295  for (int j = 0; j <= 4; j++) {
296  if (j > 2) {
297  e2x5R += energyMap_[i][j].second;
298  }
299  }
300  }
301  e2x5Right_ = e2x5R;
302 }

References e2x5Right_, energyMap_, mps_fire::i, and dqmiolumiharvest::j.

Referenced by Calculate().

◆ Calculate_e2x5Top()

void ClusterShapeAlgo::Calculate_e2x5Top ( )
private

Definition at line 328 of file ClusterShapeAlgo.cc.

328  {
329  double e2x5T = 0.0;
330  for (int i = 0; i <= 4; i++) {
331  for (int j = 0; j <= 4; j++) {
332  if (i < 2) {
333  e2x5T += energyMap_[i][j].second;
334  }
335  }
336  }
337  e2x5Top_ = e2x5T;
338 }

References e2x5Top_, energyMap_, mps_fire::i, and dqmiolumiharvest::j.

Referenced by Calculate().

◆ Calculate_e3x2()

void ClusterShapeAlgo::Calculate_e3x2 ( )
private

Definition at line 177 of file ClusterShapeAlgo.cc.

177  {
178  double e3x2 = 0.0;
179  double e3x2Ratio = 0.0, e3x2RatioNumerator = 0.0, e3x2RatioDenominator = 0.0;
180 
181  int e2ndX = 2, e2ndY = 2;
182  int deltaY = 0, deltaX = 0;
183 
184  double nextEnergy = -999;
185  int nextEneryDirection = -1;
186 
187  for (int cardinalDirection = 0; cardinalDirection < 4; cardinalDirection++) {
188  switch (cardinalDirection) {
189  case 0:
190  deltaX = -1;
191  deltaY = 0;
192  break;
193  case 1:
194  deltaX = 1;
195  deltaY = 0;
196  break;
197  case 2:
198  deltaX = 0;
199  deltaY = -1;
200  break;
201  case 3:
202  deltaX = 0;
203  deltaY = 1;
204  break;
205  }
206 
207  if (energyMap_[2 + deltaY][2 + deltaX].second >= nextEnergy) {
208  nextEnergy = energyMap_[2 + deltaY][2 + deltaX].second;
209  nextEneryDirection = cardinalDirection;
210 
211  e2ndX = 2 + deltaX;
212  e2ndY = 2 + deltaY;
213  }
214  }
215 
216  switch (nextEneryDirection) {
217  case 0:;
218  case 1:
219  deltaX = 0;
220  deltaY = 1;
221  break;
222  case 2:;
223  case 3:
224  deltaX = 1;
225  deltaY = 0;
226  break;
227  }
228 
229  for (int sign = -1; sign <= 1; sign++)
230  e3x2 += (energyMap_[2 + deltaY * sign][2 + deltaX * sign].second +
231  energyMap_[e2ndY + deltaY * sign][e2ndX + deltaX * sign].second);
232 
233  e3x2RatioNumerator =
234  energyMap_[e2ndY + deltaY][e2ndX + deltaX].second + energyMap_[e2ndY - deltaY][e2ndX - deltaX].second;
235  e3x2RatioDenominator = 0.5 + energyMap_[2 + deltaY][2 + deltaX].second + energyMap_[2 - deltaY][2 - deltaX].second;
236  e3x2Ratio = e3x2RatioNumerator / e3x2RatioDenominator;
237 
238  e3x2_ = e3x2;
239  e3x2Ratio_ = e3x2Ratio;
240 }

References e3x2_, e3x2Ratio_, energyMap_, edm::second(), and Validation_hcalonly_cfi::sign.

Referenced by Calculate().

◆ Calculate_e3x3()

void ClusterShapeAlgo::Calculate_e3x3 ( )
private

Definition at line 242 of file ClusterShapeAlgo.cc.

242  {
243  double e3x3 = 0;
244 
245  for (int i = 1; i <= 3; i++)
246  for (int j = 1; j <= 3; j++)
247  e3x3 += energyMap_[j][i].second;
248 
249  e3x3_ = e3x3;
250 }

References e3x3_, energyMap_, mps_fire::i, dqmiolumiharvest::j, and edm::second().

Referenced by Calculate().

◆ Calculate_e4x4()

void ClusterShapeAlgo::Calculate_e4x4 ( )
private

Definition at line 252 of file ClusterShapeAlgo.cc.

252  {
253  double e4x4 = 0;
254 
255  int startX = -1, startY = -1;
256 
257  switch (e2x2_Diagonal_X_) {
258  case 1:
259  startX = 0;
260  break;
261  case 3:
262  startX = 1;
263  break;
264  }
265 
266  switch (e2x2_Diagonal_Y_) {
267  case 1:
268  startY = 0;
269  break;
270  case 3:
271  startY = 1;
272  break;
273  }
274 
275  for (int i = startX; i <= startX + 3; i++)
276  for (int j = startY; j <= startY + 3; j++)
277  e4x4 += energyMap_[j][i].second;
278 
279  e4x4_ = e4x4;
280 }

References e2x2_Diagonal_X_, e2x2_Diagonal_Y_, e4x4_, energyMap_, mps_fire::i, dqmiolumiharvest::j, and edm::second().

Referenced by Calculate().

◆ Calculate_e5x5()

void ClusterShapeAlgo::Calculate_e5x5 ( )
private

Definition at line 282 of file ClusterShapeAlgo.cc.

282  {
283  double e5x5 = 0;
284 
285  for (int i = 0; i <= 4; i++)
286  for (int j = 0; j <= 4; j++)
287  e5x5 += energyMap_[j][i].second;
288 
289  e5x5_ = e5x5;
290 }

References e5x5_, energyMap_, mps_fire::i, dqmiolumiharvest::j, and edm::second().

Referenced by Calculate().

◆ Calculate_EnergyDepTopology()

void ClusterShapeAlgo::Calculate_EnergyDepTopology ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits,
const CaloSubdetectorGeometry geometry,
bool  logW = true 
)
private

Definition at line 619 of file ClusterShapeAlgo.cc.

622  {
623  // resets the energy distribution
624  energyDistribution_.clear();
625 
626  // init a map of the energy deposition centered on the
627  // cluster centroid. This is for momenta calculation only.
628  CLHEP::Hep3Vector clVect(passedCluster.position().x(), passedCluster.position().y(), passedCluster.position().z());
629  CLHEP::Hep3Vector clDir(clVect);
630  clDir *= 1.0 / clDir.mag();
631  // in the transverse plane, axis perpendicular to clusterDir
632  CLHEP::Hep3Vector theta_axis(clDir.y(), -clDir.x(), 0.0);
633  theta_axis *= 1.0 / theta_axis.mag();
634  CLHEP::Hep3Vector phi_axis = theta_axis.cross(clDir);
635 
636  const std::vector<std::pair<DetId, float> >& clusterDetIds = passedCluster.hitsAndFractions();
637 
639  EcalRecHit testEcalRecHit;
640  // loop over crystals
641  for (auto const& posCurrent : clusterDetIds) {
642  EcalRecHitCollection::const_iterator itt = hits->find(posCurrent.first);
643  testEcalRecHit = *itt;
644 
645  if ((posCurrent.first != DetId(0)) && (hits->find(posCurrent.first) != hits->end())) {
646  clEdep.deposited_energy = testEcalRecHit.energy();
647 
648  // if logarithmic weight is requested, apply cut on minimum energy of the recHit
649  if (logW) {
650  double w0_ = parameterSet_.getParameter<double>("W0");
651 
652  if (clEdep.deposited_energy == 0) {
653  LogDebug("ClusterShapeAlgo") << "Crystal has zero energy; skipping... ";
654  continue;
655  }
656  double weight = std::max(0.0, w0_ + log(fabs(clEdep.deposited_energy) / passedCluster.energy()));
657  if (weight == 0) {
658  LogDebug("ClusterShapeAlgo") << "Crystal has insufficient energy: E = " << clEdep.deposited_energy
659  << " GeV; skipping... ";
660  continue;
661  } else
662  LogDebug("ClusterShapeAlgo") << "===> got crystal. Energy = " << clEdep.deposited_energy << " GeV. ";
663  }
664  DetId id_ = posCurrent.first;
665  auto this_cell = geometry->getGeometry(id_);
666  const GlobalPoint& cellPos = this_cell->getPosition();
667  CLHEP::Hep3Vector gblPos(cellPos.x(), cellPos.y(), cellPos.z()); //surface position?
668  // Evaluate the distance from the cluster centroid
669  CLHEP::Hep3Vector diff = gblPos - clVect;
670  // Important: for the moment calculation, only the "lateral distance" is important
671  // "lateral distance" r_i = distance of the digi position from the axis Origin-Cluster Center
672  // ---> subtract the projection on clDir
673  CLHEP::Hep3Vector DigiVect = diff - diff.dot(clDir) * clDir;
674  clEdep.r = DigiVect.mag();
675  LogDebug("ClusterShapeAlgo") << "E = " << clEdep.deposited_energy << "\tdiff = " << diff.mag()
676  << "\tr = " << clEdep.r;
677  clEdep.phi = DigiVect.angle(theta_axis);
678  if (DigiVect.dot(phi_axis) < 0)
679  clEdep.phi = 2 * M_PI - clEdep.phi;
680  energyDistribution_.push_back(clEdep);
681  }
682  }
683 }

References EcalClusterEnergyDeposition::deposited_energy, change_name::diff, EcalRecHit::energy(), reco::CaloCluster::energy(), energyDistribution_, edm::ParameterSet::getParameter(), hfClusterShapes_cfi::hits, reco::CaloCluster::hitsAndFractions(), dqm-mbProfile::log, LogDebug, M_PI, SiStripPI::max, parameterSet_, EcalClusterEnergyDeposition::phi, reco::CaloCluster::position(), EcalClusterEnergyDeposition::r, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by Calculate().

◆ Calculate_lat()

void ClusterShapeAlgo::Calculate_lat ( const reco::BasicCluster passedCluster)
private

Definition at line 469 of file ClusterShapeAlgo.cc.

469  {
470  double r, redmoment = 0;
471  double phiRedmoment = 0;
472  double etaRedmoment = 0;
473  int n, n1, n2, tmp;
474  int clusterSize = energyDistribution_.size();
475  if (clusterSize < 3) {
476  etaLat_ = 0.0;
477  lat_ = 0.0;
478  return;
479  }
480 
481  n1 = 0;
482  n2 = 1;
483  if (energyDistribution_[1].deposited_energy > energyDistribution_[0].deposited_energy) {
484  tmp = n2;
485  n2 = n1;
486  n1 = tmp;
487  }
488  for (int i = 2; i < clusterSize; i++) {
489  n = i;
490  if (energyDistribution_[i].deposited_energy > energyDistribution_[n1].deposited_energy) {
491  tmp = n2;
492  n2 = n1;
493  n1 = i;
494  n = tmp;
495  } else {
496  if (energyDistribution_[i].deposited_energy > energyDistribution_[n2].deposited_energy) {
497  tmp = n2;
498  n2 = i;
499  n = tmp;
500  }
501  }
502 
503  r = energyDistribution_[n].r;
504  redmoment += r * r * energyDistribution_[n].deposited_energy;
505  double rphi = r * cos(energyDistribution_[n].phi);
506  phiRedmoment += rphi * rphi * energyDistribution_[n].deposited_energy;
507  double reta = r * sin(energyDistribution_[n].phi);
508  etaRedmoment += reta * reta * energyDistribution_[n].deposited_energy;
509  }
510  double e1 = energyDistribution_[n1].deposited_energy;
511  double e2 = energyDistribution_[n2].deposited_energy;
512 
513  lat_ = redmoment / (redmoment + 2.19 * 2.19 * (e1 + e2));
514  phiLat_ = phiRedmoment / (phiRedmoment + 2.19 * 2.19 * (e1 + e2));
515  etaLat_ = etaRedmoment / (etaRedmoment + 2.19 * 2.19 * (e1 + e2));
516 }

References funct::cos(), StorageManager_cfg::e1, energyDistribution_, etaLat_, mps_fire::i, lat_, dqmiodumpmetadata::n, phi, phiLat_, alignCSCRings::r, funct::sin(), and createJobs::tmp.

Referenced by Calculate().

◆ Calculate_Polynomials()

void ClusterShapeAlgo::Calculate_Polynomials ( double  rho)
private

Definition at line 685 of file ClusterShapeAlgo.cc.

685  {
686  fcn_.push_back(f00(rho));
687  fcn_.push_back(f11(rho));
688  fcn_.push_back(f20(rho));
689  fcn_.push_back(f31(rho));
690  fcn_.push_back(f22(rho));
691  fcn_.push_back(f33(rho));
692  fcn_.push_back(f40(rho));
693  fcn_.push_back(f51(rho));
694  fcn_.push_back(f42(rho));
695  fcn_.push_back(f53(rho));
696  fcn_.push_back(f44(rho));
697  fcn_.push_back(f55(rho));
698 }

References f00(), f11(), f20(), f22(), f31(), f33(), f40(), f42(), f44(), f51(), f53(), f55(), fcn_, and rho.

Referenced by fast_AbsZernikeMoment().

◆ Calculate_TopEnergy()

void ClusterShapeAlgo::Calculate_TopEnergy ( const reco::BasicCluster passedCluster,
const EcalRecHitCollection hits 
)
private

Definition at line 70 of file ClusterShapeAlgo.cc.

70  {
71  double eMax = 0;
72  DetId eMaxId(0);
73 
74  const std::vector<std::pair<DetId, float> >& clusterDetIds = passedCluster.hitsAndFractions();
75 
76  EcalRecHit testEcalRecHit;
77 
78  for (auto const& posCurrent : clusterDetIds) {
79  if ((posCurrent.first != DetId(0)) && (hits->find(posCurrent.first) != hits->end())) {
80  EcalRecHitCollection::const_iterator itt = hits->find(posCurrent.first);
81  testEcalRecHit = *itt;
82 
83  if (testEcalRecHit.energy() * posCurrent.second > eMax) {
84  eMax = testEcalRecHit.energy() * posCurrent.second;
85  eMaxId = testEcalRecHit.id();
86  }
87  }
88  }
89 
90  eMax_ = eMax;
91  eMaxId_ = eMaxId;
92 }

References cosmicPhotonAnalyzer_cfi::eMax, eMax_, eMaxId_, EcalRecHit::energy(), hfClusterShapes_cfi::hits, reco::CaloCluster::hitsAndFractions(), and EcalRecHit::id().

Referenced by Calculate().

◆ Create_Map()

void ClusterShapeAlgo::Create_Map ( const EcalRecHitCollection hits,
const CaloSubdetectorTopology topology 
)
private

Definition at line 118 of file ClusterShapeAlgo.cc.

118  {
119  EcalRecHit tempEcalRecHit;
121 
122  for (int x = 0; x < 5; x++)
123  for (int y = 0; y < 5; y++) {
124  posCurrent.home();
125  posCurrent.offsetBy(-2 + x, -2 + y);
126 
127  if ((*posCurrent != DetId(0)) && (hits->find(*posCurrent) != hits->end())) {
128  EcalRecHitCollection::const_iterator itt = hits->find(*posCurrent);
129  tempEcalRecHit = *itt;
130  energyMap_[y][x] = std::make_pair(tempEcalRecHit.id(), tempEcalRecHit.energy());
131  } else
132  energyMap_[y][x] = std::make_pair(DetId(0), 0);
133  }
134 }

References eMaxId_, EcalRecHit::energy(), energyMap_, hfClusterShapes_cfi::hits, CaloNavigator< T, TOPO >::home(), EcalRecHit::id(), CaloNavigator< T, TOPO >::offsetBy(), ecaldqm::topology(), x, and y.

Referenced by Calculate().

◆ f00()

double ClusterShapeAlgo::f00 ( double  r)
private

Definition at line 540 of file ClusterShapeAlgo.cc.

540 { return 1; }

Referenced by Calculate_Polynomials().

◆ f11()

double ClusterShapeAlgo::f11 ( double  r)
private

Definition at line 542 of file ClusterShapeAlgo.cc.

542 { return r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f20()

double ClusterShapeAlgo::f20 ( double  r)
private

Definition at line 544 of file ClusterShapeAlgo.cc.

544 { return 2.0 * r * r - 1.0; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f22()

double ClusterShapeAlgo::f22 ( double  r)
private

Definition at line 546 of file ClusterShapeAlgo.cc.

546 { return r * r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f31()

double ClusterShapeAlgo::f31 ( double  r)
private

Definition at line 548 of file ClusterShapeAlgo.cc.

548 { return 3.0 * r * r * r - 2.0 * r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f33()

double ClusterShapeAlgo::f33 ( double  r)
private

Definition at line 550 of file ClusterShapeAlgo.cc.

550 { return r * r * r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f40()

double ClusterShapeAlgo::f40 ( double  r)
private

Definition at line 552 of file ClusterShapeAlgo.cc.

552 { return 6.0 * r * r * r * r - 6.0 * r * r + 1.0; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f42()

double ClusterShapeAlgo::f42 ( double  r)
private

Definition at line 554 of file ClusterShapeAlgo.cc.

554 { return 4.0 * r * r * r * r - 3.0 * r * r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f44()

double ClusterShapeAlgo::f44 ( double  r)
private

Definition at line 556 of file ClusterShapeAlgo.cc.

556 { return r * r * r * r; }

References alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f51()

double ClusterShapeAlgo::f51 ( double  r)
private

Definition at line 558 of file ClusterShapeAlgo.cc.

558 { return 10.0 * pow(r, 5) - 12.0 * pow(r, 3) + 3.0 * r; }

References funct::pow(), and alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f53()

double ClusterShapeAlgo::f53 ( double  r)
private

Definition at line 560 of file ClusterShapeAlgo.cc.

560 { return 5.0 * pow(r, 5) - 4.0 * pow(r, 3); }

References funct::pow(), and alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ f55()

double ClusterShapeAlgo::f55 ( double  r)
private

Definition at line 562 of file ClusterShapeAlgo.cc.

562 { return pow(r, 5); }

References funct::pow(), and alignCSCRings::r.

Referenced by Calculate_Polynomials().

◆ factorial()

double ClusterShapeAlgo::factorial ( int  n) const
private

Definition at line 700 of file ClusterShapeAlgo.cc.

700  {
701  double res = 1.0;
702  for (int i = 2; i <= n; i++)
703  res *= (double)i;
704  return res;
705 }

References mps_fire::i, and dqmiodumpmetadata::n.

Referenced by calc_AbsZernikeMoment().

◆ fast_AbsZernikeMoment()

double ClusterShapeAlgo::fast_AbsZernikeMoment ( const reco::BasicCluster passedCluster,
int  n,
int  m,
double  R0 
)
private

Definition at line 564 of file ClusterShapeAlgo.cc.

564  {
565  double r, ph, e, Re = 0, Im = 0, result;
566  double TotalEnergy = passedCluster.energy();
567  int index = (n / 2) * (n / 2) + (n / 2) + m;
568  int clusterSize = energyDistribution_.size();
569  if (clusterSize < 3)
570  return 0.0;
571 
572  for (int i = 0; i < clusterSize; i++) {
573  r = energyDistribution_[i].r / R0;
574  if (r < 1) {
575  fcn_.clear();
577  ph = (energyDistribution_[i]).phi;
578  e = energyDistribution_[i].deposited_energy;
579  Re = Re + e / TotalEnergy * fcn_[index] * cos((double)m * ph);
580  Im = Im - e / TotalEnergy * fcn_[index] * sin((double)m * ph);
581  }
582  }
583  result = sqrt(Re * Re + Im * Im);
584 
585  return result;
586 }

References Calculate_Polynomials(), funct::cos(), MillePedeFileConverter_cfg::e, reco::CaloCluster::energy(), energyDistribution_, fcn_, mps_fire::i, visualization-live-secondInstance_cfg::m, dqmiodumpmetadata::n, phi, alignCSCRings::r, HLT_FULL_cff::R0, mps_fire::result, funct::sin(), and mathSSE::sqrt().

Referenced by absZernikeMoment().

Member Data Documentation

◆ A20_

double ClusterShapeAlgo::A20_
private

Definition at line 104 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_ComplexZernikeMoments().

◆ A42_

double ClusterShapeAlgo::A42_
private

Definition at line 104 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_ComplexZernikeMoments().

◆ covEtaEta_

double ClusterShapeAlgo::covEtaEta_
private

Definition at line 97 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_Covariances().

◆ covEtaPhi_

double ClusterShapeAlgo::covEtaPhi_
private

Definition at line 97 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_Covariances().

◆ covPhiPhi_

double ClusterShapeAlgo::covPhiPhi_
private

Definition at line 97 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_Covariances().

◆ e2nd_

double ClusterShapeAlgo::e2nd_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_2ndEnergy().

◆ e2ndId_

DetId ClusterShapeAlgo::e2ndId_
private

Definition at line 107 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_2ndEnergy().

◆ e2x2_

double ClusterShapeAlgo::e2x2_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e2x2().

◆ e2x2_Diagonal_X_

int ClusterShapeAlgo::e2x2_Diagonal_X_
private

Definition at line 95 of file ClusterShapeAlgo.h.

Referenced by Calculate_e2x2(), and Calculate_e4x4().

◆ e2x2_Diagonal_Y_

int ClusterShapeAlgo::e2x2_Diagonal_Y_
private

Definition at line 95 of file ClusterShapeAlgo.h.

Referenced by Calculate_e2x2(), and Calculate_e4x4().

◆ e2x5Bottom_

double ClusterShapeAlgo::e2x5Bottom_
private

Definition at line 99 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e2x5Bottom().

◆ e2x5Left_

double ClusterShapeAlgo::e2x5Left_
private

Definition at line 99 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e2x5Left().

◆ e2x5Right_

double ClusterShapeAlgo::e2x5Right_
private

Definition at line 99 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e2x5Right().

◆ e2x5Top_

double ClusterShapeAlgo::e2x5Top_
private

Definition at line 99 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e2x5Top().

◆ e3x2_

double ClusterShapeAlgo::e3x2_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e3x2().

◆ e3x2Ratio_

double ClusterShapeAlgo::e3x2Ratio_
private

Definition at line 100 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e3x2().

◆ e3x3_

double ClusterShapeAlgo::e3x3_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e3x3().

◆ e4x4_

double ClusterShapeAlgo::e4x4_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_e4x4().

◆ e5x5_

double ClusterShapeAlgo::e5x5_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), Calculate_Covariances(), and Calculate_e5x5().

◆ eMax_

double ClusterShapeAlgo::eMax_
private

Definition at line 98 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_TopEnergy().

◆ eMaxId_

DetId ClusterShapeAlgo::eMaxId_
private

◆ energyBasketFractionEta_

std::vector<double> ClusterShapeAlgo::energyBasketFractionEta_
private

Definition at line 105 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_BarrelBasketEnergyFraction().

◆ energyBasketFractionPhi_

std::vector<double> ClusterShapeAlgo::energyBasketFractionPhi_
private

Definition at line 106 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_BarrelBasketEnergyFraction().

◆ energyDistribution_

std::vector<EcalClusterEnergyDeposition> ClusterShapeAlgo::energyDistribution_
private

◆ energyMap_

std::pair<DetId, double> ClusterShapeAlgo::energyMap_[5][5]
private

◆ etaLat_

double ClusterShapeAlgo::etaLat_
private

Definition at line 102 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_lat().

◆ fcn_

std::vector<double> ClusterShapeAlgo::fcn_
private

Definition at line 109 of file ClusterShapeAlgo.h.

Referenced by Calculate_Polynomials(), and fast_AbsZernikeMoment().

◆ lat_

double ClusterShapeAlgo::lat_
private

Definition at line 101 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_lat().

◆ parameterSet_

edm::ParameterSet ClusterShapeAlgo::parameterSet_
private

Definition at line 92 of file ClusterShapeAlgo.h.

Referenced by Calculate_Covariances(), and Calculate_EnergyDepTopology().

◆ phiLat_

double ClusterShapeAlgo::phiLat_
private

Definition at line 103 of file ClusterShapeAlgo.h.

Referenced by Calculate(), and Calculate_lat().

change_name.diff
diff
Definition: change_name.py:13
EcalClusterEnergyDeposition
Definition: ClusterShapeAlgo.h:29
DDAxes::y
EcalRecHit
Definition: EcalRecHit.h:15
ClusterShapeAlgo::covEtaPhi_
double covEtaPhi_
Definition: ClusterShapeAlgo.h:97
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
ClusterShapeAlgo::Calculate_lat
void Calculate_lat(const reco::BasicCluster &passedCluster)
Definition: ClusterShapeAlgo.cc:469
mps_fire.i
i
Definition: mps_fire.py:428
edm::SortedCollection< EcalRecHit >::const_iterator
std::vector< EcalRecHit >::const_iterator const_iterator
Definition: SortedCollection.h:80
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
ClusterShapeAlgo::e3x2_
double e3x2_
Definition: ClusterShapeAlgo.h:98
ClusterShapeAlgo::e2x5Left_
double e2x5Left_
Definition: ClusterShapeAlgo.h:99
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ClusterShapeAlgo::f31
double f31(double r)
Definition: ClusterShapeAlgo.cc:548
ClusterShapeAlgo::e5x5_
double e5x5_
Definition: ClusterShapeAlgo.h:98
EcalRecHit::id
DetId id() const
get the id
Definition: EcalRecHit.h:77
ClusterShapeAlgo::Calculate_e2x5Top
void Calculate_e2x5Top()
Definition: ClusterShapeAlgo.cc:328
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
EBDetId
Definition: EBDetId.h:17
ClusterShapeAlgo::e2x2_
double e2x2_
Definition: ClusterShapeAlgo.h:98
EcalBarrelGeometry::getBasketSizeInPhi
int getBasketSizeInPhi() const
Definition: EcalBarrelGeometry.h:61
ClusterShapeAlgo::f42
double f42(double r)
Definition: ClusterShapeAlgo.cc:554
geometry
Definition: geometry.py:1
ClusterShapeAlgo::Calculate_TopEnergy
void Calculate_TopEnergy(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits)
Definition: ClusterShapeAlgo.cc:70
ClusterShapeAlgo::f11
double f11(double r)
Definition: ClusterShapeAlgo.cc:542
ClusterShapeAlgo::f53
double f53(double r)
Definition: ClusterShapeAlgo.cc:560
distTCMET_cfi.corner
corner
Definition: distTCMET_cfi.py:38
EcalClusterEnergyDeposition::r
double r
Definition: ClusterShapeAlgo.h:31
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
ClusterShapeAlgo::e2x5Top_
double e2x5Top_
Definition: ClusterShapeAlgo.h:99
DDAxes::x
ClusterShapeAlgo::eMax_
double eMax_
Definition: ClusterShapeAlgo.h:98
EcalRecHit::energy
float energy() const
Definition: EcalRecHit.h:68
ClusterShapeAlgo::e3x3_
double e3x3_
Definition: ClusterShapeAlgo.h:98
HLT_FULL_cff.dPhi
dPhi
Definition: HLT_FULL_cff.py:13765
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
dqmdumpme.first
first
Definition: dqmdumpme.py:55
ClusterShapeAlgo::e3x2Ratio_
double e3x2Ratio_
Definition: ClusterShapeAlgo.h:100
EcalBarrel
Definition: EcalSubdetector.h:10
ClusterShapeAlgo::Calculate_Polynomials
void Calculate_Polynomials(double rho)
Definition: ClusterShapeAlgo.cc:685
ClusterShapeAlgo::f22
double f22(double r)
Definition: ClusterShapeAlgo.cc:546
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
ClusterShapeAlgo::f51
double f51(double r)
Definition: ClusterShapeAlgo.cc:558
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
ClusterShapeAlgo::Calculate_e2x2
void Calculate_e2x2()
Definition: ClusterShapeAlgo.cc:136
alignCSCRings.s
s
Definition: alignCSCRings.py:92
ClusterShapeAlgo::fast_AbsZernikeMoment
double fast_AbsZernikeMoment(const reco::BasicCluster &passedCluster, int n, int m, double R0)
Definition: ClusterShapeAlgo.cc:564
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ClusterShapeAlgo::phiLat_
double phiLat_
Definition: ClusterShapeAlgo.h:103
ecaldqm::topology
const CaloTopology * topology(nullptr)
ClusterShapeAlgo::Calculate_2ndEnergy
void Calculate_2ndEnergy(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits)
Definition: ClusterShapeAlgo.cc:94
w
const double w
Definition: UKUtility.cc:23
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
ClusterShapeAlgo::e2x5Right_
double e2x5Right_
Definition: ClusterShapeAlgo.h:99
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::ClusterShape
Definition: ClusterShape.h:21
Geom::pi
constexpr double pi()
Definition: Pi.h:31
Geom::twoPi
constexpr double twoPi()
Definition: Pi.h:32
EBDetId::MAX_IPHI
static const int MAX_IPHI
Definition: EBDetId.h:137
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
ClusterShapeAlgo::Eta
Definition: ClusterShapeAlgo.h:111
Point3DBase< float, GlobalTag >
EcalClusterEnergyDeposition::phi
double phi
Definition: ClusterShapeAlgo.h:32
DDAxes::rho
ClusterShapeAlgo::f20
double f20(double r)
Definition: ClusterShapeAlgo.cc:544
ClusterShapeAlgo::f55
double f55(double r)
Definition: ClusterShapeAlgo.cc:562
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
ClusterShapeAlgo::energyBasketFractionPhi_
std::vector< double > energyBasketFractionPhi_
Definition: ClusterShapeAlgo.h:106
ClusterShapeAlgo::e2x5Bottom_
double e2x5Bottom_
Definition: ClusterShapeAlgo.h:99
ClusterShapeAlgo::Calculate_e2x5Right
void Calculate_e2x5Right()
Definition: ClusterShapeAlgo.cc:292
ClusterShapeAlgo::e2x2_Diagonal_Y_
int e2x2_Diagonal_Y_
Definition: ClusterShapeAlgo.h:95
CaloNavigator::home
void home() const
move the navigator back to the starting point
Definition: CaloNavigator.h:96
EcalBarrelGeometry
Definition: EcalBarrelGeometry.h:19
reco::CaloCluster::hitsAndFractions
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
Definition: CaloCluster.h:210
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
ClusterShapeAlgo::Calculate_BarrelBasketEnergyFraction
void Calculate_BarrelBasketEnergyFraction(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const int EtaPhi, const CaloSubdetectorGeometry *geometry)
Definition: ClusterShapeAlgo.cc:406
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
ClusterShapeAlgo::Calculate_e2x5Bottom
void Calculate_e2x5Bottom()
Definition: ClusterShapeAlgo.cc:316
ClusterShapeAlgo::Calculate_e2x5Left
void Calculate_e2x5Left()
Definition: ClusterShapeAlgo.cc:304
StorageManager_cfg.e1
e1
Definition: StorageManager_cfg.py:16
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
ClusterShapeAlgo::parameterSet_
edm::ParameterSet parameterSet_
Definition: ClusterShapeAlgo.h:92
ClusterShapeAlgo::Calculate_e3x3
void Calculate_e3x3()
Definition: ClusterShapeAlgo.cc:242
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
ClusterShapeAlgo::absZernikeMoment
double absZernikeMoment(const reco::BasicCluster &passedCluster, int n, int m, double R0=6.6)
Definition: ClusterShapeAlgo.cc:525
ClusterShapeAlgo::f44
double f44(double r)
Definition: ClusterShapeAlgo.cc:556
ClusterShapeAlgo::Calculate_e4x4
void Calculate_e4x4()
Definition: ClusterShapeAlgo.cc:252
res
Definition: Electron.h:6
EcalClusterEnergyDeposition::deposited_energy
double deposited_energy
Definition: ClusterShapeAlgo.h:30
reco::CaloCluster::position
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:154
ClusterShapeAlgo::energyBasketFractionEta_
std::vector< double > energyBasketFractionEta_
Definition: ClusterShapeAlgo.h:105
ClusterShapeAlgo::f00
double f00(double r)
Definition: ClusterShapeAlgo.cc:540
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ClusterShapeAlgo::energyMap_
std::pair< DetId, double > energyMap_[5][5]
Definition: ClusterShapeAlgo.h:94
DDAxes::phi
ClusterShapeAlgo::e2x2_Diagonal_X_
int e2x2_Diagonal_X_
Definition: ClusterShapeAlgo.h:95
HLTTauDQMOffline_cfi.denominator
denominator
Definition: HLTTauDQMOffline_cfi.py:180
ClusterShapeAlgo::Calculate_EnergyDepTopology
void Calculate_EnergyDepTopology(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry, bool logW=true)
Definition: ClusterShapeAlgo.cc:619
CaloNavigator
Definition: CaloNavigator.h:7
ClusterShapeAlgo::A20_
double A20_
Definition: ClusterShapeAlgo.h:104
ClusterShapeAlgo::Calculate_Covariances
void Calculate_Covariances(const reco::BasicCluster &passedCluster, const EcalRecHitCollection *hits, const CaloSubdetectorGeometry *geometry)
Definition: ClusterShapeAlgo.cc:340
HLT_FULL_cff.dEta
dEta
Definition: HLT_FULL_cff.py:13764
ClusterShapeAlgo::factorial
double factorial(int n) const
Definition: ClusterShapeAlgo.cc:700
ClusterShapeAlgo::covPhiPhi_
double covPhiPhi_
Definition: ClusterShapeAlgo.h:97
ClusterShapeAlgo::eMaxId_
DetId eMaxId_
Definition: ClusterShapeAlgo.h:107
ClusterShapeAlgo::A42_
double A42_
Definition: ClusterShapeAlgo.h:104
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ClusterShapeAlgo::e2ndId_
DetId e2ndId_
Definition: ClusterShapeAlgo.h:107
CaloNavigator::offsetBy
T offsetBy(int deltaX, int deltaY) const
Free movement of arbitray steps.
Definition: CaloNavigator.h:66
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ClusterShapeAlgo::e2nd_
double e2nd_
Definition: ClusterShapeAlgo.h:98
ClusterShapeAlgo::calc_AbsZernikeMoment
double calc_AbsZernikeMoment(const reco::BasicCluster &passedCluster, int n, int m, double R0)
Definition: ClusterShapeAlgo.cc:588
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
ClusterShapeAlgo::Phi
Definition: ClusterShapeAlgo.h:111
ClusterShapeAlgo::fcn_
std::vector< double > fcn_
Definition: ClusterShapeAlgo.h:109
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ClusterShapeAlgo::e4x4_
double e4x4_
Definition: ClusterShapeAlgo.h:98
ClusterShapeAlgo::lat_
double lat_
Definition: ClusterShapeAlgo.h:101
ClusterShapeAlgo::Calculate_e3x2
void Calculate_e3x2()
Definition: ClusterShapeAlgo.cc:177
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HLT_FULL_cff.R0
R0
Definition: HLT_FULL_cff.py:8692
ClusterShapeAlgo::covEtaEta_
double covEtaEta_
Definition: ClusterShapeAlgo.h:97
ClusterShapeAlgo::Create_Map
void Create_Map(const EcalRecHitCollection *hits, const CaloSubdetectorTopology *topology)
Definition: ClusterShapeAlgo.cc:118
ClusterShapeAlgo::Calculate_ComplexZernikeMoments
void Calculate_ComplexZernikeMoments(const reco::BasicCluster &passedCluster)
Definition: ClusterShapeAlgo.cc:518
reco::CaloCluster::energy
double energy() const
cluster energy
Definition: CaloCluster.h:149
ClusterShapeAlgo::Calculate_e5x5
void Calculate_e5x5()
Definition: ClusterShapeAlgo.cc:282
ClusterShapeAlgo::f40
double f40(double r)
Definition: ClusterShapeAlgo.cc:552
ClusterShapeAlgo::energyDistribution_
std::vector< EcalClusterEnergyDeposition > energyDistribution_
Definition: ClusterShapeAlgo.h:108
weight
Definition: weight.py:1
EcalBarrelGeometry::getEtaBaskets
const std::vector< int > & getEtaBaskets() const
Definition: EcalBarrelGeometry.h:59
ClusterShapeAlgo::etaLat_
double etaLat_
Definition: ClusterShapeAlgo.h:102
ClusterShapeAlgo::f33
double f33(double r)
Definition: ClusterShapeAlgo.cc:550
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EBDetId::MIN_IPHI
static const int MIN_IPHI
Definition: EBDetId.h:135