CMS 3D CMS Logo

EcalHaloAlgo.cc
Go to the documentation of this file.
4 
5 /*
6  [class]: EcalHaloAlgo
7  [authors]: R. Remington, The University of Florida
8  [description]: See EcalHaloAlgo.h
9  [date]: October 15, 2009
10 */
11 namespace {
12  constexpr float c_cm_per_ns = 29.9792458;
13 };
14 using namespace std;
15 using namespace reco;
16 using namespace edm;
17 
18 bool CompareTime(const EcalRecHit* x, const EcalRecHit* y) { return x->time() < y->time(); }
19 
21  RoundnessCut = 0;
22  AngleCut = 0;
26  SumEnergyThreshold = 0.;
27  NHitsThreshold = 0;
28 
29  geo = nullptr;
30 }
31 
35  edm::Handle<EBRecHitCollection>& TheEBRecHits,
36  edm::Handle<EERecHitCollection>& TheEERecHits,
37  edm::Handle<ESRecHitCollection>& TheESRecHits,
38  edm::Handle<HBHERecHitCollection>& TheHBHERecHits,
39  const edm::EventSetup& TheSetup) {
40  EcalHaloData TheEcalHaloData;
41 
42  // Store energy sum of rechits as a function of iPhi (iphi goes from 1 to 72)
43  float SumE[361];
44  // Store number of rechits as a function of iPhi
45  int NumHits[361];
46  // Store minimum time of rechit as a function of iPhi
47  float MinTimeHits[361];
48  // Store maximum time of rechit as a function of iPhi
49  float MaxTimeHits[361];
50 
51  // initialize
52  for (int i = 0; i < 361; i++) {
53  SumE[i] = 0.;
54  NumHits[i] = 0;
55  MinTimeHits[i] = 9999.;
56  MaxTimeHits[i] = -9999.;
57  }
58 
59  // Loop over EB RecHits
60  for (EBRecHitCollection::const_iterator hit = TheEBRecHits->begin(); hit != TheEBRecHits->end(); hit++) {
61  // Arbitrary threshold to kill noise (needs to be optimized with data)
62  if (hit->energy() < EBRecHitEnergyThreshold)
63  continue;
64 
65  // Get Det Id of the rechit
66  DetId id = DetId(hit->id());
67 
68  // Get EB geometry
69  const CaloSubdetectorGeometry* TheSubGeometry = TheCaloGeometry.getSubdetectorGeometry(DetId::Ecal, 1);
70  EBDetId EcalID(id.rawId());
71  auto cell = (TheSubGeometry) ? (TheSubGeometry->getGeometry(id)) : nullptr;
72 
73  if (cell) {
74  // GlobalPoint globalpos = cell->getPosition();
75  // float r = TMath::Sqrt ( globalpos.y()*globalpos.y() + globalpos.x()*globalpos.x());
76  int iPhi = EcalID.iphi();
77 
78  if (iPhi < 361) // just to be safe
79  {
80  //iPhi = (iPhi-1)/5 +1; // convert ecal iphi to phiwedge iphi (e.g. there are 5 crystal per phi wedge, as in calotowers )
81  SumE[iPhi] += hit->energy();
82  NumHits[iPhi]++;
83 
84  float time = hit->time();
85  MinTimeHits[iPhi] = time < MinTimeHits[iPhi] ? time : MinTimeHits[iPhi];
86  MaxTimeHits[iPhi] = time > MaxTimeHits[iPhi] ? time : MaxTimeHits[iPhi];
87  }
88  }
89  }
90 
91  //for( int iPhi = 1 ; iPhi < 73; iPhi++ )
92  for (int iPhi = 1; iPhi < 361; iPhi++) {
93  if (SumE[iPhi] >= SumEnergyThreshold && NumHits[iPhi] > NHitsThreshold) {
94  // Build PhiWedge and store to EcalHaloData if energy or #hits pass thresholds
95  PhiWedge wedge(SumE[iPhi], iPhi, NumHits[iPhi], MinTimeHits[iPhi], MaxTimeHits[iPhi]);
96 
97  // Loop over rechits again to calculate direction based on timing info
98 
99  // Loop over EB RecHits
100  std::vector<const EcalRecHit*> Hits;
101  for (EBRecHitCollection::const_iterator hit = TheEBRecHits->begin(); hit != TheEBRecHits->end(); hit++) {
102  if (hit->energy() < EBRecHitEnergyThreshold)
103  continue;
104 
105  // Get Det Id of the rechit
106  DetId id = DetId(hit->id());
107  EBDetId EcalID(id.rawId());
108  int Hit_iPhi = EcalID.iphi();
109  //Hit_iPhi = (Hit_iPhi-1)/5 +1; // convert ecal iphi to phiwedge iphi
110  if (Hit_iPhi != iPhi)
111  continue;
112  Hits.push_back(&(*hit));
113  }
114  std::sort(Hits.begin(), Hits.end(), CompareTime);
115  float MinusToPlus = 0.;
116  float PlusToMinus = 0.;
117  for (unsigned int i = 0; i < Hits.size(); i++) {
118  DetId id_i = DetId(Hits[i]->id());
119  EBDetId EcalID_i(id_i.rawId());
120  int ieta_i = EcalID_i.ieta();
121  for (unsigned int j = (i + 1); j < Hits.size(); j++) {
122  DetId id_j = DetId(Hits[j]->id());
123  EBDetId EcalID_j(id_j.rawId());
124  int ieta_j = EcalID_j.ieta();
125  if (ieta_i > ieta_j)
126  PlusToMinus += TMath::Abs(ieta_j - ieta_i);
127  else
128  MinusToPlus += TMath::Abs(ieta_j - ieta_i);
129  }
130  }
131 
132  float PlusZOriginConfidence = (PlusToMinus + MinusToPlus) ? PlusToMinus / (PlusToMinus + MinusToPlus) : -1.;
133  wedge.SetPlusZOriginConfidence(PlusZOriginConfidence);
134  TheEcalHaloData.GetPhiWedges().push_back(wedge);
135  }
136  }
137 
138  std::vector<float> vShowerShapes_Roundness;
139  std::vector<float> vShowerShapes_Angle;
140  if (TheSuperClusters.isValid()) {
141  for (reco::SuperClusterCollection::const_iterator cluster = TheSuperClusters->begin();
142  cluster != TheSuperClusters->end();
143  cluster++) {
144  if (abs(cluster->eta()) <= 1.48) {
145  vector<float> shapes = EcalClusterTools::roundnessBarrelSuperClusters(*cluster, (*TheEBRecHits.product()));
146  float roundness = shapes[0];
147  float angle = shapes[1];
148 
149  // Check if supercluster belongs to photon and passes the cuts on roundness and angle, if so store the reference to it
150  if ((roundness >= 0 && roundness < GetRoundnessCut()) && angle >= 0 && angle < GetAngleCut()) {
151  edm::Ref<SuperClusterCollection> TheClusterRef(TheSuperClusters, cluster - TheSuperClusters->begin());
152  bool BelongsToPhoton = false;
153  if (ThePhotons.isValid()) {
154  for (reco::PhotonCollection::const_iterator iPhoton = ThePhotons->begin(); iPhoton != ThePhotons->end();
155  iPhoton++) {
156  if (iPhoton->isEB())
157  if (TheClusterRef == iPhoton->superCluster()) {
158  BelongsToPhoton = true;
159  break;
160  }
161  }
162  }
163  //Only store refs to suspicious EB SuperClusters which belong to Photons
164  //Showershape variables are more discriminating for these cases
165  if (BelongsToPhoton) {
166  TheEcalHaloData.GetSuperClusters().push_back(TheClusterRef);
167  }
168  }
169  vShowerShapes_Roundness.push_back(shapes[0]);
170  vShowerShapes_Angle.push_back(shapes[1]);
171  } else {
172  vShowerShapes_Roundness.push_back(-1.);
173  vShowerShapes_Angle.push_back(-1.);
174  }
175  }
176 
177  edm::ValueMap<float>::Filler TheRoundnessFiller(TheEcalHaloData.GetShowerShapesRoundness());
178  TheRoundnessFiller.insert(TheSuperClusters, vShowerShapes_Roundness.begin(), vShowerShapes_Roundness.end());
179  TheRoundnessFiller.fill();
180 
181  edm::ValueMap<float>::Filler TheAngleFiller(TheEcalHaloData.GetShowerShapesAngle());
182  TheAngleFiller.insert(TheSuperClusters, vShowerShapes_Angle.begin(), vShowerShapes_Angle.end());
183  TheAngleFiller.fill();
184  }
185 
186  geo = &TheSetup.getData(geoToken_);
187 
188  //Halo cluster building:
189  //Various clusters are built, depending on the subdetector.
190  //In barrel, one looks for deposits narrow in phi.
191  //In endcaps, one looks for localized deposits (dr condition in EE where r =sqrt(dphi*dphi+deta*deta)
192  //H/E condition is also applied in EB.
193  //The halo cluster building step targets a large efficiency (ideally >99%) for beam halo deposits.
194  //These clusters are used as input for the halo pattern finding methods in EcalHaloAlgo and for the CSC-calo matching methods in GlobalHaloAlgo.
195 
196  //Et threshold hardcoded for now. Might one to get it from config
197  std::vector<HaloClusterCandidateECAL> haloclustercands_EB;
198  haloclustercands_EB = GetHaloClusterCandidateEB(TheEBRecHits, TheHBHERecHits, 5);
199 
200  std::vector<HaloClusterCandidateECAL> haloclustercands_EE;
201  haloclustercands_EE = GetHaloClusterCandidateEE(TheEERecHits, TheHBHERecHits, 10);
202 
203  TheEcalHaloData.setHaloClusterCandidatesEB(haloclustercands_EB);
204  TheEcalHaloData.setHaloClusterCandidatesEE(haloclustercands_EE);
205 
206  return TheEcalHaloData;
207 }
208 
209 std::vector<HaloClusterCandidateECAL> EcalHaloAlgo::GetHaloClusterCandidateEB(
210  edm::Handle<EcalRecHitCollection>& ecalrechitcoll,
211  edm::Handle<HBHERecHitCollection>& hbherechitcoll,
212  float et_thresh_seedrh) {
213  std::vector<HaloClusterCandidateECAL> TheHaloClusterCandsEB;
214  reco::Vertex::Point vtx(0, 0, 0);
215 
216  for (size_t ihit = 0; ihit < ecalrechitcoll->size(); ++ihit) {
217  HaloClusterCandidateECAL clustercand;
218 
219  const EcalRecHit& rechit = (*ecalrechitcoll)[ihit];
220  math::XYZPoint rhpos = getPosition(rechit.id(), vtx);
221  //Et condition
222 
223  double rhet = rechit.energy() * sqrt(rhpos.perp2() / rhpos.mag2());
224  if (rhet < et_thresh_seedrh)
225  continue;
226  double eta = rhpos.eta();
227  double phi = rhpos.phi();
228 
229  bool isiso = true;
230  double etcluster(0);
231  int nbcrystalsameeta(0);
232  double timediscriminator(0);
233  double etstrip_iphiseedplus1(0), etstrip_iphiseedminus1(0);
234 
235  //Building the cluster
237  for (size_t jhit = 0; jhit < ecalrechitcoll->size(); ++jhit) {
238  const EcalRecHit& rechitj = (*ecalrechitcoll)[jhit];
239  EcalRecHitRef rhRef(ecalrechitcoll, jhit);
240  math::XYZPoint rhposj = getPosition(rechitj.id(), vtx);
241 
242  double etaj = rhposj.eta();
243  double phij = rhposj.phi();
244 
245  double deta = eta - etaj;
246  double dphi = deltaPhi(phi, phij);
247  if (std::abs(deta) > 0.2)
248  continue; //This means +/-11 crystals in eta
249  if (std::abs(dphi) > 0.08)
250  continue; //This means +/-4 crystals in phi
251 
252  double rhetj = rechitj.energy() * sqrt(rhposj.perp2() / rhposj.mag2());
253  //Rechits with et between 1 and 2 GeV are saved in the rh list but not used in the calculation of the halocluster variables
254  if (rhetj < 1)
255  continue;
256  bhrhcandidates.push_back(rhRef);
257  if (rhetj < 2)
258  continue;
259 
260  if (std::abs(dphi) > 0.03) {
261  isiso = false;
262  break;
263  } //The strip should be isolated
264  if (std::abs(dphi) < 0.01)
265  nbcrystalsameeta++;
266  if (dphi > 0.01)
267  etstrip_iphiseedplus1 += rhetj;
268  if (dphi < -0.01)
269  etstrip_iphiseedminus1 += rhetj;
270  etcluster += rhetj;
271  //Timing discriminator
272  //We assign a weight to the rechit defined as:
273  //Log10(Et)*f(T,R,Z)
274  //where f(T,R,Z) is the separation curve between halo-like and IP-like times.
275  //The time difference between a deposit from a outgoing IT halo and a deposit coming from a particle emitted at the IP is given by:
276  //dt= ( - sqrt(R^2+z^2) + |z| )/c
277  //Here we take R to be 130 cm.
278  //For EB, the function was parametrized as a function of ieta instead of Z.
279  double rhtj = rechitj.time();
280  EBDetId detj = rechitj.id();
281  int rhietaj = detj.ieta();
282  timediscriminator += std::log10(rhetj) *
283  (rhtj + 0.5 * (sqrt(16900 + 9 * rhietaj * rhietaj) - 3 * std::abs(rhietaj)) / c_cm_per_ns);
284  }
285  //Isolation condition
286  if (!isiso)
287  continue;
288 
289  //Calculate H/E
290  double hoe(0);
291  for (size_t jhit = 0; jhit < hbherechitcoll->size(); ++jhit) {
292  const HBHERecHit& rechitj = (*hbherechitcoll)[jhit];
293  math::XYZPoint rhposj = getPosition(rechitj.id(), vtx);
294  double rhetj = rechitj.energy() * sqrt(rhposj.perp2() / rhposj.mag2());
295  if (rhetj < 2)
296  continue;
297  double etaj = rhposj.eta();
298  double phij = rhposj.phi();
299  double deta = eta - etaj;
300  double dphi = deltaPhi(phi, phij);
301  if (std::abs(deta) > 0.2)
302  continue;
303  if (std::abs(dphi) > 0.2)
304  continue;
305  hoe += rhetj / etcluster;
306  }
307  //H/E condition
308  if (hoe > 0.1)
309  continue;
310 
311  clustercand.setClusterEt(etcluster);
312  clustercand.setSeedEt(rhet);
313  clustercand.setSeedEta(eta);
314  clustercand.setSeedPhi(phi);
315  clustercand.setSeedZ(rhpos.Z());
316  clustercand.setSeedR(sqrt(rhpos.perp2()));
317  clustercand.setSeedTime(rechit.time());
318  clustercand.setHoverE(hoe);
319  clustercand.setNbofCrystalsInEta(nbcrystalsameeta);
320  clustercand.setEtStripIPhiSeedPlus1(etstrip_iphiseedplus1);
321  clustercand.setEtStripIPhiSeedMinus1(etstrip_iphiseedminus1);
322  clustercand.setTimeDiscriminator(timediscriminator);
323  clustercand.setBeamHaloRecHitsCandidates(bhrhcandidates);
324 
325  bool isbeamhalofrompattern = EBClusterShapeandTimeStudy(clustercand, false);
326  clustercand.setIsHaloFromPattern(isbeamhalofrompattern);
327 
328  bool isbeamhalofrompattern_hlt = EBClusterShapeandTimeStudy(clustercand, true);
329  clustercand.setIsHaloFromPattern_HLT(isbeamhalofrompattern_hlt);
330 
331  TheHaloClusterCandsEB.push_back(clustercand);
332  }
333 
334  return TheHaloClusterCandsEB;
335 }
336 
337 std::vector<HaloClusterCandidateECAL> EcalHaloAlgo::GetHaloClusterCandidateEE(
338  edm::Handle<EcalRecHitCollection>& ecalrechitcoll,
339  edm::Handle<HBHERecHitCollection>& hbherechitcoll,
340  float et_thresh_seedrh) {
341  std::vector<HaloClusterCandidateECAL> TheHaloClusterCandsEE;
342 
343  reco::Vertex::Point vtx(0, 0, 0);
344 
345  for (size_t ihit = 0; ihit < ecalrechitcoll->size(); ++ihit) {
346  HaloClusterCandidateECAL clustercand;
347 
348  const EcalRecHit& rechit = (*ecalrechitcoll)[ihit];
349  math::XYZPoint rhpos = getPosition(rechit.id(), vtx);
350  //Et condition
351  double rhet = rechit.energy() * sqrt(rhpos.perp2() / rhpos.mag2());
352  if (rhet < et_thresh_seedrh)
353  continue;
354  double eta = rhpos.eta();
355  double phi = rhpos.phi();
356  double rhr = sqrt(rhpos.perp2());
357 
358  bool isiso = true;
359  double etcluster(0);
360  double timediscriminator(0);
361  int clustersize(0);
362  int nbcrystalssmallt(0);
363  int nbcrystalshight(0);
364  //Building the cluster
366  for (size_t jhit = 0; jhit < ecalrechitcoll->size(); ++jhit) {
367  const EcalRecHit& rechitj = (*ecalrechitcoll)[jhit];
368  EcalRecHitRef rhRef(ecalrechitcoll, jhit);
369  math::XYZPoint rhposj = getPosition(rechitj.id(), vtx);
370 
371  //Ask the hits to be in the same endcap
372  if (rhposj.z() * rhpos.z() < 0)
373  continue;
374 
375  double etaj = rhposj.eta();
376  double phij = rhposj.phi();
377  double dr = sqrt((eta - etaj) * (eta - etaj) + deltaPhi(phi, phij) * deltaPhi(phi, phij));
378 
379  //Outer cone
380  if (dr > 0.3)
381  continue;
382 
383  double rhetj = rechitj.energy() * sqrt(rhposj.perp2() / rhposj.mag2());
384  //Rechits with et between 1 and 2 GeV are saved in the rh list but not used in the calculation of the halocluster variables
385  if (rhetj < 1)
386  continue;
387  bhrhcandidates.push_back(rhRef);
388  if (rhetj < 2)
389  continue;
390 
391  //Isolation between outer and inner cone
392  if (dr > 0.05) {
393  isiso = false;
394  break;
395  } //The deposit should be isolated
396 
397  etcluster += rhetj;
398 
399  //Timing infos:
400  //Here we target both IT and OT beam halo
401  double rhtj = rechitj.time();
402 
403  //Discriminating variables for OT beam halo:
404  if (rhtj > 1)
405  nbcrystalshight++;
406  if (rhtj < 0)
407  nbcrystalssmallt++;
408  //Timing test (likelihood ratio), only for seeds with large R (100 cm) and for crystals with et>5,
409  //This targets IT beam halo (t around - 1ns)
410  if (rhtj > 5) {
411  double corrt_j = rhtj + sqrt(rhposj.x() * rhposj.x() + rhposj.y() * rhposj.y() + 320. * 320.) / c_cm_per_ns -
412  320. / c_cm_per_ns;
413  //BH is modeled by a Gaussian peaking at 0.
414  //Collisions is modeled by a Gaussian peaking at 0.3
415  //The width is similar and taken to be 0.4
416  timediscriminator += 0.5 * (pow((corrt_j - 0.3) / 0.4, 2) - pow((corrt_j - 0.) / 0.4, 2));
417  clustersize++;
418  }
419  }
420  //Isolation condition
421  if (!isiso)
422  continue;
423 
424  //Calculate H2/E
425  //Only second hcal layer is considered as it can happen that a shower initiated in EE reaches HCAL first layer
426  double h2oe(0);
427  for (size_t jhit = 0; jhit < hbherechitcoll->size(); ++jhit) {
428  const HBHERecHit& rechitj = (*hbherechitcoll)[jhit];
429  math::XYZPoint rhposj = getPosition(rechitj.id(), vtx);
430 
431  //Ask the hits to be in the same endcap
432  if (rhposj.z() * rhpos.z() < 0)
433  continue;
434  //Selects only second HCAL layer
435  if (std::abs(rhposj.z()) < 425)
436  continue;
437 
438  double rhetj = rechitj.energy() * sqrt(rhposj.perp2() / rhposj.mag2());
439  if (rhetj < 2)
440  continue;
441 
442  double phij = rhposj.phi();
443  if (std::abs(deltaPhi(phi, phij)) > 0.4)
444  continue;
445 
446  double rhrj = sqrt(rhposj.perp2());
447  if (std::abs(rhr - rhrj) > 50)
448  continue;
449 
450  h2oe += rhetj / etcluster;
451  }
452  //H/E condition
453  if (h2oe > 0.1)
454  continue;
455 
456  clustercand.setClusterEt(etcluster);
457  clustercand.setSeedEt(rhet);
458  clustercand.setSeedEta(eta);
459  clustercand.setSeedPhi(phi);
460  clustercand.setSeedZ(rhpos.Z());
461  clustercand.setSeedR(sqrt(rhpos.perp2()));
462  clustercand.setSeedTime(rechit.time());
463  clustercand.setH2overE(h2oe);
464  clustercand.setNbEarlyCrystals(nbcrystalssmallt);
465  clustercand.setNbLateCrystals(nbcrystalshight);
466  clustercand.setClusterSize(clustersize);
467  clustercand.setTimeDiscriminator(timediscriminator);
468  clustercand.setBeamHaloRecHitsCandidates(bhrhcandidates);
469 
470  bool isbeamhalofrompattern =
471  EEClusterShapeandTimeStudy_ITBH(clustercand, false) || EEClusterShapeandTimeStudy_OTBH(clustercand, false);
472  clustercand.setIsHaloFromPattern(isbeamhalofrompattern);
473 
474  bool isbeamhalofrompattern_hlt =
475  EEClusterShapeandTimeStudy_ITBH(clustercand, true) || EEClusterShapeandTimeStudy_OTBH(clustercand, true);
476  clustercand.setIsHaloFromPattern_HLT(isbeamhalofrompattern_hlt);
477 
478  TheHaloClusterCandsEE.push_back(clustercand);
479  }
480 
481  return TheHaloClusterCandsEE;
482 }
483 
485  //Conditions on the central strip size in eta.
486  //For low size, extra conditions on seed et, isolation and cluster timing
487  //The time condition only targets IT beam halo.
488  //EB rechits from OT beam halos are typically too late (around 5 ns or more) and seem therefore already cleaned by the reconstruction.
489 
490  if (hcand.getSeedEt() < 5)
491  return false;
492  if (hcand.getNbofCrystalsInEta() < 4)
493  return false;
494  if (hcand.getNbofCrystalsInEta() == 4 && hcand.getSeedEt() < 10)
495  return false;
496  if (hcand.getNbofCrystalsInEta() == 4 && hcand.getEtStripIPhiSeedPlus1() > 0.1 &&
497  hcand.getEtStripIPhiSeedMinus1() > 0.1)
498  return false;
499  if (hcand.getNbofCrystalsInEta() <= 5 && hcand.getTimeDiscriminator() >= 0.)
500  return false;
501 
502  //For HLT, only use conditions without timing and tighten seed et condition
503  if (ishlt && hcand.getNbofCrystalsInEta() <= 5)
504  return false;
505  if (ishlt && hcand.getSeedEt() < 10)
506  return false;
507 
508  hcand.setIsHaloFromPattern(true);
509 
510  return true;
511 }
512 
514  //Separate conditions targeting IT and OT beam halos
515  //For OT beam halos, just require enough crystals with large T
516  if (hcand.getSeedEt() < 20)
517  return false;
518  if (hcand.getSeedTime() < 0.5)
519  return false;
520  if (hcand.getNbLateCrystals() - hcand.getNbEarlyCrystals() < 2)
521  return false;
522 
523  //The use of time information does not allow this method to work at HLT
524  if (ishlt)
525  return false;
526 
527  hcand.setIsHaloFromPattern(true);
528 
529  return true;
530 }
531 
533  //Separate conditions targeting IT and OT beam halos
534  //For IT beam halos, fakes from collisions are higher => require the cluster size to be small.
535  //Only halos with R>100 cm are considered here.
536  //For lower values, the time difference with particles from collisions is too small
537  //IT outgoing beam halos that interact in EE at low R is probably the most difficult category to deal with:
538  //Their signature is very close to the one of photon from collisions (similar cluster shape and timing)
539  if (hcand.getSeedEt() < 20)
540  return false;
541  if (hcand.getSeedR() < 100)
542  return false;
543  if (hcand.getTimeDiscriminator() < 1)
544  return false;
545  if (hcand.getClusterSize() < 2)
546  return false;
547  if (hcand.getClusterSize() > 4)
548  return false;
549 
550  //The use of time information does not allow this method to work at HLT
551  if (ishlt)
552  return false;
553 
554  hcand.setIsHaloFromPattern(true);
555 
556  return true;
557 }
558 
560  const GlobalPoint& pos = geo->getPosition(id);
561  math::XYZPoint posV(pos.x() - vtx.x(), pos.y() - vtx.y(), pos.z() - vtx.z());
562  return posV;
563 }
EcalHaloAlgo::EEClusterShapeandTimeStudy_OTBH
bool EEClusterShapeandTimeStudy_OTBH(reco::HaloClusterCandidateECAL hcand, bool ishlt)
Definition: EcalHaloAlgo.cc:513
reco::HaloClusterCandidateECAL::setNbEarlyCrystals
void setNbEarlyCrystals(int x)
Definition: HaloClusterCandidateECAL.h:67
EcalRecHit
Definition: EcalRecHit.h:15
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
edm::helper::Filler::insert
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
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
EcalHaloAlgo::ESRecHitEnergyThreshold
float ESRecHitEnergyThreshold
Definition: EcalHaloAlgo.h:114
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
edm::Handle::product
T const * product() const
Definition: Handle.h:70
reco::HaloClusterCandidateECAL::setSeedR
void setSeedR(double x)
Definition: HaloClusterCandidateECAL.h:54
EcalHaloAlgo::EERecHitEnergyThreshold
float EERecHitEnergyThreshold
Definition: EcalHaloAlgo.h:113
EcalRecHit::id
DetId id() const
get the id
Definition: EcalRecHit.h:77
reco::HaloClusterCandidateECAL::getSeedEt
double getSeedEt() const
Definition: HaloClusterCandidateECAL.h:27
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
HBHERecHit
Definition: HBHERecHit.h:13
reco::EcalHaloData::GetShowerShapesAngle
edm::ValueMap< float > & GetShowerShapesAngle()
Definition: EcalHaloData.h:44
pos
Definition: PixelAliasList.h:18
reco::HaloClusterCandidateECAL::setSeedTime
void setSeedTime(double x)
Definition: HaloClusterCandidateECAL.h:55
EcalHaloAlgo::GetRoundnessCut
float GetRoundnessCut()
Definition: EcalHaloAlgo.h:92
reco::HaloClusterCandidateECAL::setTimeDiscriminator
void setTimeDiscriminator(double x)
Definition: HaloClusterCandidateECAL.h:56
reco::HaloClusterCandidateECAL::getSeedTime
double getSeedTime() const
Definition: HaloClusterCandidateECAL.h:32
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
protons_cff.time
time
Definition: protons_cff.py:39
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
edm::RefVector
Definition: EDProductfwd.h:27
EcalRecHit::energy
float energy() const
Definition: EcalRecHit.h:68
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
EcalHaloAlgo::geo
const CaloGeometry * geo
Definition: EcalHaloAlgo.h:121
edm::Handle< reco::PhotonCollection >
EcalHaloAlgo::geoToken_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoToken_
Definition: EcalHaloAlgo.h:120
reco::HaloClusterCandidateECAL::getNbLateCrystals
int getNbLateCrystals() const
Definition: HaloClusterCandidateECAL.h:46
reco::HaloClusterCandidateECAL::getTimeDiscriminator
double getTimeDiscriminator() const
Definition: HaloClusterCandidateECAL.h:33
reco::HaloClusterCandidateECAL::setSeedEta
void setSeedEta(double x)
Definition: HaloClusterCandidateECAL.h:51
reco::HaloClusterCandidateECAL::setIsHaloFromPattern_HLT
void setIsHaloFromPattern_HLT(bool x)
Definition: HaloClusterCandidateECAL.h:58
edm::Ref< SuperClusterCollection >
reco::HaloClusterCandidateECAL::setSeedZ
void setSeedZ(double x)
Definition: HaloClusterCandidateECAL.h:53
EcalHaloAlgo::EEClusterShapeandTimeStudy_ITBH
bool EEClusterShapeandTimeStudy_ITBH(reco::HaloClusterCandidateECAL hcand, bool ishlt)
Definition: EcalHaloAlgo.cc:532
DetId
Definition: DetId.h:17
reco::EcalHaloData::setHaloClusterCandidatesEE
void setHaloClusterCandidatesEE(const std::vector< HaloClusterCandidateECAL > &x)
Definition: EcalHaloData.h:53
EcalHaloAlgo.h
CaloGeometry
Definition: CaloGeometry.h:21
reco::HaloClusterCandidateECAL::setBeamHaloRecHitsCandidates
void setBeamHaloRecHitsCandidates(edm::RefVector< EcalRecHitCollection > x)
Definition: HaloClusterCandidateECAL.h:59
reco::PhiWedge
Definition: PhiWedge.h:13
reco::HaloClusterCandidateECAL::getEtStripIPhiSeedPlus1
double getEtStripIPhiSeedPlus1() const
Definition: HaloClusterCandidateECAL.h:39
Abs
T Abs(T a)
Definition: MathUtil.h:49
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
EcalHaloAlgo::EBClusterShapeandTimeStudy
bool EBClusterShapeandTimeStudy(reco::HaloClusterCandidateECAL hcand, bool ishlt)
Definition: EcalHaloAlgo.cc:484
EcalRecHit::time
float time() const
Definition: EcalRecHit.h:70
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalHaloAlgo::getPosition
math::XYZPoint getPosition(const DetId &id, reco::Vertex::Point vtx)
Definition: EcalHaloAlgo.cc:559
Point3DBase< float, GlobalTag >
reco::HaloClusterCandidateECAL::setSeedPhi
void setSeedPhi(double x)
Definition: HaloClusterCandidateECAL.h:52
EcalHaloAlgo::GetHaloClusterCandidateEB
std::vector< reco::HaloClusterCandidateECAL > GetHaloClusterCandidateEB(edm::Handle< EcalRecHitCollection > &ecalrechitcoll, edm::Handle< HBHERecHitCollection > &hbherechitcoll, float et_thresh_seedrh)
Definition: EcalHaloAlgo.cc:209
EcalHaloAlgo::GetHaloClusterCandidateEE
std::vector< reco::HaloClusterCandidateECAL > GetHaloClusterCandidateEE(edm::Handle< EcalRecHitCollection > &ecalrechitcoll, edm::Handle< HBHERecHitCollection > &hbherechitcoll, float et_thresh_seedrh)
Definition: EcalHaloAlgo.cc:337
EcalHaloAlgo::RoundnessCut
float RoundnessCut
Definition: EcalHaloAlgo.h:107
EcalHaloAlgo::EBRecHitEnergyThreshold
float EBRecHitEnergyThreshold
Definition: EcalHaloAlgo.h:112
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::HaloClusterCandidateECAL::getSeedR
double getSeedR() const
Definition: HaloClusterCandidateECAL.h:31
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
reco::HaloClusterCandidateECAL::setEtStripIPhiSeedPlus1
void setEtStripIPhiSeedPlus1(double x)
Definition: HaloClusterCandidateECAL.h:61
EcalHaloAlgo::Calculate
reco::EcalHaloData Calculate(const CaloGeometry &TheCaloGeometry, edm::Handle< reco::PhotonCollection > &ThePhotons, edm::Handle< reco::SuperClusterCollection > &TheSuperClusters, edm::Handle< EBRecHitCollection > &TheEBRecHits, edm::Handle< EERecHitCollection > &TheEERecHits, edm::Handle< ESRecHitCollection > &TheESRecHits, edm::Handle< HBHERecHitCollection > &TheHBHERecHits, const edm::EventSetup &TheSetup)
Definition: EcalHaloAlgo.cc:32
reco::HaloClusterCandidateECAL
Definition: HaloClusterCandidateECAL.h:21
reco::HaloClusterCandidateECAL::getEtStripIPhiSeedMinus1
double getEtStripIPhiSeedMinus1() const
Definition: HaloClusterCandidateECAL.h:40
reco::EcalHaloData
Definition: EcalHaloData.h:21
reco::EcalHaloData::setHaloClusterCandidatesEB
void setHaloClusterCandidatesEB(const std::vector< HaloClusterCandidateECAL > &x)
Definition: EcalHaloData.h:52
edm::EventSetup
Definition: EventSetup.h:58
DetId::Ecal
Definition: DetId.h:27
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
reco::HaloClusterCandidateECAL::getNbEarlyCrystals
int getNbEarlyCrystals() const
Definition: HaloClusterCandidateECAL.h:45
reco::HaloClusterCandidateECAL::setClusterEt
void setClusterEt(double x)
Definition: HaloClusterCandidateECAL.h:49
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
electrons_cff.hoe
hoe
Definition: electrons_cff.py:398
ValueMap.h
EcalHaloAlgo::GetAngleCut
float GetAngleCut()
Definition: EcalHaloAlgo.h:94
reco::HaloClusterCandidateECAL::setIsHaloFromPattern
void setIsHaloFromPattern(bool x)
Definition: HaloClusterCandidateECAL.h:57
DDAxes::phi
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
reco::HaloClusterCandidateECAL::setSeedEt
void setSeedEt(double x)
Definition: HaloClusterCandidateECAL.h:50
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
CompareTime
bool CompareTime(const EcalRecHit *x, const EcalRecHit *y)
Definition: EcalHaloAlgo.cc:18
EcalHaloAlgo::EcalHaloAlgo
EcalHaloAlgo(edm::ConsumesCollector iC)
Definition: EcalHaloAlgo.cc:20
EcalHaloAlgo::NHitsThreshold
int NHitsThreshold
Definition: EcalHaloAlgo.h:118
EcalHaloAlgo::AngleCut
float AngleCut
Definition: EcalHaloAlgo.h:109
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
reco::EcalHaloData::GetSuperClusters
edm::RefVector< reco::SuperClusterCollection > & GetSuperClusters()
Definition: EcalHaloData.h:37
reco::HaloClusterCandidateECAL::setNbofCrystalsInEta
void setNbofCrystalsInEta(double x)
Definition: HaloClusterCandidateECAL.h:64
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
reco::HaloClusterCandidateECAL::getNbofCrystalsInEta
int getNbofCrystalsInEta() const
Definition: HaloClusterCandidateECAL.h:42
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
reco::HaloClusterCandidateECAL::setH2overE
void setH2overE(double x)
Definition: HaloClusterCandidateECAL.h:66
ConsumesCollector.h
edm::helper::Filler
Definition: ValueMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
reco::PhiWedge::SetPlusZOriginConfidence
void SetPlusZOriginConfidence(float x)
Definition: PhiWedge.h:69
reco::HaloClusterCandidateECAL::setClusterSize
void setClusterSize(int x)
Definition: HaloClusterCandidateECAL.h:69
reco::EcalHaloData::GetShowerShapesRoundness
edm::ValueMap< float > & GetShowerShapesRoundness()
Definition: EcalHaloData.h:41
EcalHaloAlgo::SumEnergyThreshold
float SumEnergyThreshold
Definition: EcalHaloAlgo.h:117
HBHERecHit::id
constexpr HcalDetId id() const
get the id
Definition: HBHERecHit.h:41
reco::HaloClusterCandidateECAL::setEtStripIPhiSeedMinus1
void setEtStripIPhiSeedMinus1(double x)
Definition: HaloClusterCandidateECAL.h:62
reco::HaloClusterCandidateECAL::setNbLateCrystals
void setNbLateCrystals(int x)
Definition: HaloClusterCandidateECAL.h:68
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
reco::HaloClusterCandidateECAL::getClusterSize
int getClusterSize() const
Definition: HaloClusterCandidateECAL.h:47
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
reco::HaloClusterCandidateECAL::setHoverE
void setHoverE(double x)
Definition: HaloClusterCandidateECAL.h:63
hit
Definition: SiStripHitEffFromCalibTree.cc:88
reco::EcalHaloData::GetPhiWedges
const std::vector< PhiWedge > & GetPhiWedges() const
Definition: EcalHaloData.h:33