CMS 3D CMS Logo

L1EGammaCrystalsEmulatorProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: L1CaloTrigger
4 // Class: L1EGammaCrystalsEmulatorProducer
5 //
11 //
12 // Original Author: Cecile Caillol
13 // Created: Tue Aug 10 2018
14 //
15 // Redesign, Calibration: Vladimir Rekovic
16 // Date: Tue May 12 2020
17 //
18 // $Id$
19 //
20 //
21 
22 // system include files
23 #include <memory>
24 #include <array>
25 #include <iostream>
26 #include <cmath>
27 
28 // user include files
34 
43 
44 // ECAL TPs
46 
47 // HCAL TPs
49 
50 // Output tower collection
54 
58 
59 static constexpr bool do_brem = true;
60 
61 static constexpr int n_eta_bins = 2;
62 static constexpr int n_borders_phi = 18;
63 static constexpr int n_borders_eta = 18;
64 static constexpr int n_clusters_max = 5;
65 static constexpr int n_clusters_link = 3;
66 static constexpr int n_clusters_4link = 4 * 3;
67 static constexpr int n_crystals_towerEta = 5;
68 static constexpr int n_crystals_towerPhi = 5;
69 static constexpr int n_crystals_3towers = 3 * 5;
70 static constexpr int n_towers_per_link = 17;
71 static constexpr int n_clusters_per_link = 2;
72 static constexpr int n_towers_Eta = 34;
73 static constexpr int n_towers_Phi = 72;
74 static constexpr int n_towers_halfPhi = 36;
75 static constexpr int n_links_card = 4;
76 static constexpr int n_links_GCTcard = 48;
77 static constexpr int n_GCTcards = 3;
78 static constexpr float ECAL_eta_range = 1.4841;
79 static constexpr float half_crystal_size = 0.00873;
80 static constexpr float slideIsoPtThreshold = 80;
81 static constexpr float plateau_ss = 130.0;
82 static constexpr float a0_80 = 0.85, a1_80 = 0.0080, a0 = 0.21; // passes_iso
83 static constexpr float b0 = 0.38, b1 = 1.9, b2 = 0.05; //passes_looseTkiso
84 static constexpr float c0_ss = 0.94, c1_ss = 0.052, c2_ss = 0.044; //passes_ss
85 static constexpr float d0 = 0.96, d1 = 0.0003; //passes_photon
86 static constexpr float e0_looseTkss = 0.944, e1_looseTkss = 0.65, e2_looseTkss = 0.4; //passes_looseTkss
87 static constexpr float cut_500_MeV = 0.5;
88 
89 // absolue IDs range from 0-33
90 // 0-16 are iEta -17 to -1
91 // 17 to 33 are iEta 1 to 17
92 static constexpr int toweriEta_fromAbsoluteID_shift = 16;
93 
94 // absolue IDs range from 0-71.
95 // To align with detector tower IDs (1 - n_towers_Phi)
96 // shift all indices by 37 and loop over after 72
97 static constexpr int toweriPhi_fromAbsoluteID_shift_lowerHalf = 37;
98 static constexpr int toweriPhi_fromAbsoluteID_shift_upperHalf = 35;
99 
100 float getEta_fromL2LinkCardTowerCrystal(int link, int card, int tower, int crystal) {
102  crystal % n_crystals_towerEta;
103  float size_cell = 2 * ECAL_eta_range / (n_crystals_towerEta * n_towers_Eta);
104  return etaID * size_cell - ECAL_eta_range + half_crystal_size;
105 }
106 
107 float getPhi_fromL2LinkCardTowerCrystal(int link, int card, int tower, int crystal) {
108  int phiID = n_crystals_towerPhi * ((card * 24) + (n_links_card * (link / 8)) + (tower / n_towers_per_link)) +
109  crystal / n_crystals_towerPhi;
110  float size_cell = 2 * M_PI / (n_crystals_towerPhi * n_towers_Phi);
111  return phiID * size_cell - M_PI + half_crystal_size;
112 }
113 
114 int getCrystal_etaID(float eta) {
115  float size_cell = 2 * ECAL_eta_range / (n_crystals_towerEta * n_towers_Eta);
116  int etaID = int((eta + ECAL_eta_range) / size_cell);
117  return etaID;
118 }
119 
121 
122 int convert_L2toL1_tower(int tower) { return tower; }
123 
124 int convert_L2toL1_card(int card, int link) { return card * n_clusters_4link + link / n_links_card; }
125 
126 int getCrystal_phiID(float phi) {
127  float size_cell = 2 * M_PI / (n_crystals_towerPhi * n_towers_Phi);
128  int phiID = int((phi + M_PI) / size_cell);
129  return phiID;
130 }
131 
133  float size_cell = 2 * ECAL_eta_range / n_towers_Eta;
134  int etaID = int((eta + ECAL_eta_range) / size_cell);
135  return etaID;
136 }
137 
139  float size_cell = 2 * M_PI / n_towers_Phi;
140  int phiID = int((phi + M_PI) / size_cell);
141  return phiID;
142 }
143 
145  if (id < n_towers_per_link)
146  return id - n_towers_per_link;
147  else
148  return id - toweriEta_fromAbsoluteID_shift;
149 }
150 
152  if (id < n_towers_Phi / 2)
154  else
156 }
157 
159  float size_cell = 2 * ECAL_eta_range / n_towers_Eta;
160  float eta = (id * size_cell) - ECAL_eta_range + 0.5 * size_cell;
161  return eta;
162 }
163 
165  float size_cell = 2 * M_PI / n_towers_Phi;
166  float phi = (id * size_cell) - M_PI + 0.5 * size_cell;
167  return phi;
168 }
169 
170 int getCrystalIDInTower(int etaID, int phiID) {
171  return int(n_crystals_towerPhi * (phiID % n_crystals_towerPhi) + (etaID % n_crystals_towerEta));
172 }
173 
174 int get_towerEta_fromCardTowerInCard(int card, int towerincard) {
175  return n_towers_per_link * (card % 2) + towerincard % n_towers_per_link;
176 }
177 
178 int get_towerPhi_fromCardTowerInCard(int card, int towerincard) {
179  return 4 * (card / 2) + towerincard / n_towers_per_link;
180 }
181 
182 int get_towerEta_fromCardLinkTower(int card, int link, int tower) { return n_towers_per_link * (card % 2) + tower; }
183 
184 int get_towerPhi_fromCardLinkTower(int card, int link, int tower) { return 4 * (card / 2) + link; }
185 
186 int getTowerID(int etaID, int phiID) {
187  return int(n_towers_per_link * ((phiID / n_crystals_towerPhi) % 4) +
189 }
190 
191 int getTower_phiID(int cluster_phiID) { // Tower ID in card given crystal ID in total detector
192  return int((cluster_phiID / n_crystals_towerPhi) % 4);
193 }
194 
195 int getTower_etaID(int cluster_etaID) { // Tower ID in card given crystal ID in total detector
196  return int((cluster_etaID / n_crystals_towerEta) % n_towers_per_link);
197 }
198 
199 int getEtaMax_card(int card) {
200  int etamax = 0;
201  if (card % 2 == 0)
202  etamax = n_towers_per_link * n_crystals_towerEta - 1; // First eta half. 5 crystals in eta in 1 tower.
203  else
205  return etamax;
206 }
207 
208 int getEtaMin_card(int card) {
209  int etamin = 0;
210  if (card % 2 == 0)
211  etamin = 0 * n_crystals_towerEta; // First eta half. 5 crystals in eta in 1 tower.
212  else
214  return etamin;
215 }
216 
217 int getPhiMax_card(int card) {
218  int phimax = ((card / 2) + 1) * 4 * n_crystals_towerPhi - 1;
219  return phimax;
220 }
221 
222 int getPhiMin_card(int card) {
223  int phimin = (card / 2) * 4 * n_crystals_towerPhi;
224  return phimin;
225 }
226 
228 public:
231 
232 private:
233  void produce(edm::Event&, const edm::EventSetup&) override;
234  bool passes_ss(float pt, float ss);
235  bool passes_photon(float pt, float pss);
236  bool passes_iso(float pt, float iso);
237  bool passes_looseTkss(float pt, float ss);
238  bool passes_looseTkiso(float pt, float iso);
239  float get_calibrate(float uncorr);
240 
244 
246 
252 
253  struct mycluster {
254  float c2x2_;
255  float c2x5_;
256  float c5x5_;
261  float cpt; // ECAL pt
262  int cbrem_; // if brem corrections were applied
265  float ciso_; // pt of cluster divided by 7x7 ECAL towers
266  float chovere_; // 5x5 HCAL towers divided by the ECAL cluster pt
267  float craweta_; // coordinates between -1.44 and 1.44
268  float crawphi_; // coordinates between -pi and pi
269  float chcal_; // 5x5 HCAL towers
270  float ceta_; // eta ID in the whole detector (between 0 and 5*34-1)
271  float cphi_; // phi ID in the whole detector (between 0 and 5*72-1)
272  int ccrystalid_; // crystal ID inside tower (between 0 and 24)
274  int ctowerid_; // tower ID inside card (between 0 and 4*n_towers_per_link-1)
275  };
276 
278  private:
279  float pt_ = 0;
280  float energy_ = 0.;
281  bool isEndcapHit_ = false; // If using endcap, we won't be using integer crystal indices
282  bool stale_ = false; // Hits become stale once used in clustering algorithm to prevent overlap in clusters
283  bool used_ = false;
284  GlobalVector position_; // As opposed to GlobalPoint, so we can add them (for weighted average)
287 
288  public:
289  // tool functions
290  inline void setPt() { pt_ = (position_.mag2() > 0) ? energy_ * sin(position_.theta()) : 0; };
291  inline void setEnergy(float et) { energy_ = et / sin(position_.theta()); };
292  inline void setIsEndcapHit(bool isEC) { isEndcapHit_ = isEC; };
293  inline void setUsed(bool isUsed) { used_ = isUsed; };
294  inline void setPosition(const GlobalVector& pos) { position_ = pos; };
295  inline void setIdHcal(const HcalDetId& idhcal) { id_hcal_ = idhcal; };
296  inline void setId(const EBDetId& id) { id_ = id; };
297 
298  inline float pt() const { return pt_; };
299  inline float energy() const { return energy_; };
300  inline bool isEndcapHit() const { return isEndcapHit_; };
301  inline bool used() const { return used_; };
302  inline const GlobalVector& position() const { return position_; };
303  inline const EBDetId& id() const { return id_; };
304 
305  inline float deta(SimpleCaloHit& other) const { return position_.eta() - other.position().eta(); };
306  int dieta(SimpleCaloHit& other) const {
307  if (isEndcapHit_ || other.isEndcapHit())
308  return 9999; // We shouldn't compare integer indices in endcap, the map is not linear
309  if (id_.ieta() * other.id().ieta() > 0)
310  return id_.ieta() - other.id().ieta();
311  return id_.ieta() - other.id().ieta() - 1;
312  };
313  inline float dphi(SimpleCaloHit& other) const {
314  return reco::deltaPhi(static_cast<float>(position_.phi()), static_cast<float>(other.position().phi()));
315  };
316  int diphi(SimpleCaloHit& other) const {
317  if (isEndcapHit_ || other.isEndcapHit())
318  return 9999; // We shouldn't compare integer indices in endcap, the map is not linear
319  // Logic from EBDetId::distancePhi() without the abs()
320  static constexpr int PI = 180;
321  int result = id().iphi() - other.id().iphi();
322  while (result > PI)
323  result -= 2 * PI;
324  while (result <= -PI)
325  result += 2 * PI;
326  return result;
327  };
329  // Treat position as a point, measure 3D distance
330  // This is used for endcap hits, where we don't have a rectangular mapping
331  return (position() - other.position()).mag();
332  };
334  return (id_ == other.id() && position() == other.position() && energy_ == other.energy() &&
335  isEndcapHit_ == other.isEndcapHit());
336  };
337  };
338 };
339 
341  : ecalTPEBToken_(consumes<EcalEBTrigPrimDigiCollection>(iConfig.getParameter<edm::InputTag>("ecalTPEB"))),
342  hcalTPToken_(
343  consumes<edm::SortedCollection<HcalTriggerPrimitiveDigi> >(iConfig.getParameter<edm::InputTag>("hcalTP"))),
344  calib_(iConfig.getParameter<edm::ParameterSet>("calib")) {
345  produces<l1tp2::CaloCrystalClusterCollection>();
346  produces<BXVector<l1t::EGamma> >();
347  produces<l1tp2::CaloTowerCollection>();
348 }
349 
351 
353  using namespace edm;
354 
356  iEvent.getByToken(ecalTPEBToken_, pcalohits);
357 
363  HcalTrigTowerGeometry theTrigTowerGeometry(hcTopology_);
364  iSetup.get<CaloTPGRecord>().get(decoder_);
365 
366  //****************************************************************
367  //******************* Get all the hits ***************************
368  //****************************************************************
369 
370  // Get all the ECAL hits
371  iEvent.getByToken(ecalTPEBToken_, pcalohits);
372  std::vector<SimpleCaloHit> ecalhits;
373 
374  for (const auto& hit : *pcalohits.product()) {
375  if (hit.encodedEt() > 0) // hit.encodedEt() returns an int corresponding to 2x the crystal Et
376  {
377  // Et is 10 bit, by keeping the ADC saturation Et at 120 GeV it means that you have to divide by 8
378  float et = hit.encodedEt() / 8.;
379  if (et < cut_500_MeV)
380  continue; // keep the 500 MeV ET Cut
381 
382  auto cell = ebGeometry->getGeometry(hit.id());
383 
384  SimpleCaloHit ehit;
385  ehit.setId(hit.id());
386  ehit.setPosition(GlobalVector(cell->getPosition().x(), cell->getPosition().y(), cell->getPosition().z()));
387  ehit.setEnergy(et);
388  ehit.setPt();
389  ecalhits.push_back(ehit);
390  }
391  }
392 
393  // Get all the HCAL hits
394  std::vector<SimpleCaloHit> hcalhits;
396  iEvent.getByToken(hcalTPToken_, hbhecoll);
397  for (const auto& hit : *hbhecoll.product()) {
398  float et = decoder_->hcaletValue(hit.id(), hit.t0());
399  if (et <= 0)
400  continue;
401  if (!(hcTopology_->validHT(hit.id()))) {
402  LogError("L1EGCrystalClusterEmulatorProducer")
403  << " -- Hcal hit DetID not present in HCAL Geom: " << hit.id() << std::endl;
404  throw cms::Exception("L1EGCrystalClusterEmulatorProducer");
405  continue;
406  }
407  const std::vector<HcalDetId>& hcId = theTrigTowerGeometry.detIds(hit.id());
408  if (hcId.empty()) {
409  LogError("L1EGCrystalClusterEmulatorProducer")
410  << "Cannot find any HCalDetId corresponding to " << hit.id() << std::endl;
411  throw cms::Exception("L1EGCrystalClusterEmulatorProducer");
412  continue;
413  }
414  if (hcId[0].subdetId() > 1)
415  continue;
416  GlobalVector hcal_tp_position = GlobalVector(0., 0., 0.);
417  for (const auto& hcId_i : hcId) {
418  if (hcId_i.subdetId() > 1)
419  continue;
420  auto cell = hbGeometry->getGeometry(hcId_i);
421  if (cell == nullptr)
422  continue;
423  GlobalVector tmpVector = GlobalVector(cell->getPosition().x(), cell->getPosition().y(), cell->getPosition().z());
424  hcal_tp_position = tmpVector;
425  break;
426  }
427  SimpleCaloHit hhit;
428  hhit.setId(hit.id());
429  hhit.setIdHcal(hit.id());
430  hhit.setPosition(hcal_tp_position);
431  hhit.setEnergy(et);
432  hhit.setPt();
433  hcalhits.push_back(hhit);
434  }
435 
436  //*******************************************************************
437  //********************** Do layer 1 *********************************
438  //*******************************************************************
439 
440  // Definition of L1 outputs
441  // 36 L1 cards send each 4 links with 17 towers
442  float ECAL_tower_L1Card[n_links_card][n_towers_per_link][n_towers_halfPhi];
443  float HCAL_tower_L1Card[n_links_card][n_towers_per_link][n_towers_halfPhi];
444  int iEta_tower_L1Card[n_links_card][n_towers_per_link][n_towers_halfPhi];
445  int iPhi_tower_L1Card[n_links_card][n_towers_per_link][n_towers_halfPhi];
446  // 36 L1 cards send each 4 links with 3 clusters
447  float energy_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
448  // 36 L1 cards send each 4 links with 3 clusters
449  int brem_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
450  int towerID_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
451  int crystalID_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
452  int showerShape_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
453  int showerShapeLooseTk_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
454  int photonShowerShape_cluster_L1Card[n_links_card][n_clusters_link][n_towers_halfPhi];
455 
456  for (int ii = 0; ii < n_links_card; ++ii) {
457  for (int jj = 0; jj < n_towers_per_link; ++jj) {
458  for (int ll = 0; ll < n_towers_halfPhi; ++ll) {
459  ECAL_tower_L1Card[ii][jj][ll] = 0;
460  HCAL_tower_L1Card[ii][jj][ll] = 0;
461  iPhi_tower_L1Card[ii][jj][ll] = -999;
462  iEta_tower_L1Card[ii][jj][ll] = -999;
463  }
464  }
465  }
466  for (int ii = 0; ii < n_links_card; ++ii) {
467  for (int jj = 0; jj < n_clusters_link; ++jj) {
468  for (int ll = 0; ll < n_towers_halfPhi; ++ll) {
469  energy_cluster_L1Card[ii][jj][ll] = 0;
470  brem_cluster_L1Card[ii][jj][ll] = 0;
471  towerID_cluster_L1Card[ii][jj][ll] = 0;
472  crystalID_cluster_L1Card[ii][jj][ll] = 0;
473  }
474  }
475  }
476 
477  // There is one list of clusters per card. We take the 12 highest pt per card
478  vector<mycluster> cluster_list[n_towers_halfPhi];
479  // After merging the clusters in different regions of a single L1 card
480  vector<mycluster> cluster_list_merged[n_towers_halfPhi];
481 
482  for (int cc = 0; cc < n_towers_halfPhi; ++cc) { // Loop over 36 L1 cards
483  // Loop over 3x4 etaxphi regions to search for max 5 clusters
484  for (int nregion = 0; nregion <= n_clusters_max; ++nregion) {
485  int nclusters = 0;
486  bool build_cluster = true;
487 
488  // Continue until 5 clusters have been built or there is no cluster left
489  while (nclusters < n_clusters_max && build_cluster) {
490  build_cluster = false;
491  SimpleCaloHit centerhit;
492 
493  for (const auto& hit : ecalhits) {
494  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
495  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
496  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
497  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) &&
498  // Check that the hit is in the good card
499  getCrystal_etaID(hit.position().eta()) < getEtaMin_card(cc) + n_crystals_3towers * (nregion + 1) &&
500  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) + n_crystals_3towers * nregion &&
501  !hit.used() && hit.pt() >= 1.0 && hit.pt() > centerhit.pt()) // 3 towers x 5 crystals
502  {
503  // Highest hit in good region with pt>1 and not used in any other cluster
504  centerhit = hit;
505  build_cluster = true;
506  }
507  }
508  if (build_cluster)
509  nclusters++;
510 
511  // Use only the 5 most energetic clusters
512  if (build_cluster && nclusters > 0 && nclusters <= n_clusters_max) {
513  mycluster mc1;
514  mc1.cpt = 0.0;
515  mc1.cWeightedEta_ = 0.0;
516  mc1.cWeightedPhi_ = 0.0;
517  float leftlobe = 0;
518  float rightlobe = 0;
519  float e5x5 = 0;
520  float n5x5 = 0;
521  float e2x5_1 = 0;
522  float n2x5_1 = 0;
523  float e2x5_2 = 0;
524  float n2x5_2 = 0;
525  float e2x2_1 = 0;
526  float n2x2_1 = 0;
527  float e2x2_2 = 0;
528  float n2x2_2 = 0;
529  float e2x2_3 = 0;
530  float n2x2_3 = 0;
531  float e2x2_4 = 0;
532  float n2x2_4 = 0;
533  for (auto& hit : ecalhits) {
534  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
535  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
536  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
537  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) && hit.pt() > 0 &&
538  getCrystal_etaID(hit.position().eta()) < getEtaMin_card(cc) + n_crystals_3towers * (nregion + 1) &&
539  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) + n_crystals_3towers * nregion) {
540  if (abs(hit.dieta(centerhit)) <= 1 && hit.diphi(centerhit) > 2 && hit.diphi(centerhit) <= 7) {
541  rightlobe += hit.pt();
542  }
543  if (abs(hit.dieta(centerhit)) <= 1 && hit.diphi(centerhit) < -2 && hit.diphi(centerhit) >= -7) {
544  leftlobe += hit.pt();
545  }
546  if (abs(hit.dieta(centerhit)) <= 2 && abs(hit.diphi(centerhit)) <= 2) {
547  e5x5 += hit.energy();
548  n5x5++;
549  }
550  if ((hit.dieta(centerhit) == 1 or hit.dieta(centerhit) == 0) &&
551  (hit.diphi(centerhit) == 1 or hit.diphi(centerhit) == 0)) {
552  e2x2_1 += hit.energy();
553  n2x2_1++;
554  }
555  if ((hit.dieta(centerhit) == 0 or hit.dieta(centerhit) == -1) &&
556  (hit.diphi(centerhit) == 0 or hit.diphi(centerhit) == 1)) {
557  e2x2_2 += hit.energy();
558  n2x2_2++;
559  }
560  if ((hit.dieta(centerhit) == 0 or hit.dieta(centerhit) == 1) &&
561  (hit.diphi(centerhit) == 0 or hit.diphi(centerhit) == -1)) {
562  e2x2_3 += hit.energy();
563  n2x2_3++;
564  }
565  if ((hit.dieta(centerhit) == 0 or hit.dieta(centerhit) == -1) &&
566  (hit.diphi(centerhit) == 0 or hit.diphi(centerhit) == -1)) {
567  e2x2_4 += hit.energy();
568  n2x2_4++;
569  }
570  if ((hit.dieta(centerhit) == 0 or hit.dieta(centerhit) == 1) && abs(hit.diphi(centerhit)) <= 2) {
571  e2x5_1 += hit.energy();
572  n2x5_1++;
573  }
574  if ((hit.dieta(centerhit) == 0 or hit.dieta(centerhit) == -1) && abs(hit.diphi(centerhit)) <= 2) {
575  e2x5_2 += hit.energy();
576  n2x5_2++;
577  }
578  }
579  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
580  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
581  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
582  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) && !hit.used() && hit.pt() > 0 &&
583  abs(hit.dieta(centerhit)) <= 1 && abs(hit.diphi(centerhit)) <= 2 &&
584  getCrystal_etaID(hit.position().eta()) < getEtaMin_card(cc) + n_crystals_3towers * (nregion + 1) &&
585  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) + n_crystals_3towers * nregion) {
586  // clusters 3x5 in etaxphi using only the hits in the corresponding card and in the corresponding 3x4 region
587  hit.setUsed(true);
588  mc1.cpt += hit.pt();
589  mc1.cWeightedEta_ += float(hit.pt()) * float(hit.position().eta());
590  mc1.cWeightedPhi_ = mc1.cWeightedPhi_ + (float(hit.pt()) * float(hit.position().phi()));
591  }
592  }
593  if (do_brem && (rightlobe > 0.10 * mc1.cpt or leftlobe > 0.10 * mc1.cpt)) {
594  for (auto& hit : ecalhits) {
595  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
596  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
597  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
598  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) && hit.pt() > 0 &&
599  getCrystal_etaID(hit.position().eta()) < getEtaMin_card(cc) + n_crystals_3towers * (nregion + 1) &&
600  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) + n_crystals_3towers * nregion &&
601  !hit.used()) {
602  if (rightlobe > 0.10 * mc1.cpt && (leftlobe < 0.10 * mc1.cpt or rightlobe > leftlobe) &&
603  abs(hit.dieta(centerhit)) <= 1 && hit.diphi(centerhit) > 2 && hit.diphi(centerhit) <= 7) {
604  mc1.cpt += hit.pt();
605  hit.setUsed(true);
606  mc1.cbrem_ = 1;
607  }
608  if (leftlobe > 0.10 * mc1.cpt && (rightlobe < 0.10 * mc1.cpt or leftlobe >= rightlobe) &&
609  abs(hit.dieta(centerhit)) <= 1 && hit.diphi(centerhit) < -2 && hit.diphi(centerhit) >= -7) {
610  mc1.cpt += hit.pt();
611  hit.setUsed(true);
612  mc1.cbrem_ = 1;
613  }
614  }
615  }
616  }
617  mc1.c5x5_ = e5x5;
618  mc1.c2x5_ = max(e2x5_1, e2x5_2);
619  mc1.c2x2_ = e2x2_1;
620  if (e2x2_2 > mc1.c2x2_)
621  mc1.c2x2_ = e2x2_2;
622  if (e2x2_3 > mc1.c2x2_)
623  mc1.c2x2_ = e2x2_3;
624  if (e2x2_4 > mc1.c2x2_)
625  mc1.c2x2_ = e2x2_4;
626  mc1.cWeightedEta_ = mc1.cWeightedEta_ / mc1.cpt;
627  mc1.cWeightedPhi_ = mc1.cWeightedPhi_ / mc1.cpt;
628  mc1.ceta_ = getCrystal_etaID(centerhit.position().eta());
629  mc1.cphi_ = getCrystal_phiID(centerhit.position().phi());
630  mc1.crawphi_ = centerhit.position().phi();
631  mc1.craweta_ = centerhit.position().eta();
632  cluster_list[cc].push_back(mc1);
633  } // End if 5 clusters per region
634  } // End while to find the 5 clusters
635  } // End loop over regions to search for clusters
636  std::sort(begin(cluster_list[cc]), end(cluster_list[cc]), [](mycluster a, mycluster b) { return a.cpt > b.cpt; });
637 
638  // Merge clusters from different regions
639  for (unsigned int jj = 0; jj < unsigned(cluster_list[cc].size()); ++jj) {
640  for (unsigned int kk = jj + 1; kk < unsigned(cluster_list[cc].size()); ++kk) {
641  if (std::abs(cluster_list[cc][jj].ceta_ - cluster_list[cc][kk].ceta_) < 2 &&
642  std::abs(cluster_list[cc][jj].cphi_ - cluster_list[cc][kk].cphi_) < 2) { //Diagonale + exact neighbors
643  if (cluster_list[cc][kk].cpt > cluster_list[cc][jj].cpt) {
644  cluster_list[cc][kk].cpt += cluster_list[cc][jj].cpt;
645  cluster_list[cc][kk].c5x5_ += cluster_list[cc][jj].c5x5_;
646  cluster_list[cc][kk].c2x5_ += cluster_list[cc][jj].c2x5_;
647  cluster_list[cc][jj].cpt = 0;
648  cluster_list[cc][jj].c5x5_ = 0;
649  cluster_list[cc][jj].c2x5_ = 0;
650  cluster_list[cc][jj].c2x2_ = 0;
651  } else {
652  cluster_list[cc][jj].cpt += cluster_list[cc][kk].cpt;
653  cluster_list[cc][jj].c5x5_ += cluster_list[cc][kk].c5x5_;
654  cluster_list[cc][jj].c2x5_ += cluster_list[cc][kk].c2x5_;
655  cluster_list[cc][kk].cpt = 0;
656  cluster_list[cc][kk].c2x2_ = 0;
657  cluster_list[cc][kk].c2x5_ = 0;
658  cluster_list[cc][kk].c5x5_ = 0;
659  }
660  }
661  }
662  if (cluster_list[cc][jj].cpt > 0) {
663  cluster_list[cc][jj].cpt =
664  cluster_list[cc][jj].cpt *
665  calib_(cluster_list[cc][jj].cpt,
666  std::abs(cluster_list[cc][jj].craweta_)); //Mark's calibration as a function of eta and pt
667  cluster_list_merged[cc].push_back(cluster_list[cc][jj]);
668  }
669  }
670  std::sort(begin(cluster_list_merged[cc]), end(cluster_list_merged[cc]), [](mycluster a, mycluster b) {
671  return a.cpt > b.cpt;
672  });
673 
674  // Fill cluster information in the arrays. We keep max 12 clusters (distributed between 4 links)
675  for (unsigned int jj = 0; jj < unsigned(cluster_list_merged[cc].size()) && jj < n_clusters_4link; ++jj) {
676  crystalID_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] =
677  getCrystalIDInTower(cluster_list_merged[cc][jj].ceta_, cluster_list_merged[cc][jj].cphi_);
678  towerID_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] =
679  getTowerID(cluster_list_merged[cc][jj].ceta_, cluster_list_merged[cc][jj].cphi_);
680  energy_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = cluster_list_merged[cc][jj].cpt;
681  brem_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = cluster_list_merged[cc][jj].cbrem_;
682  if (passes_ss(cluster_list_merged[cc][jj].cpt,
683  cluster_list_merged[cc][jj].c2x5_ / cluster_list_merged[cc][jj].c5x5_))
684  showerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 1;
685  else
686  showerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 0;
687  if (passes_looseTkss(cluster_list_merged[cc][jj].cpt,
688  cluster_list_merged[cc][jj].c2x5_ / cluster_list_merged[cc][jj].c5x5_))
689  showerShapeLooseTk_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 1;
690  else
691  showerShapeLooseTk_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 0;
692  if (passes_photon(cluster_list_merged[cc][jj].cpt,
693  cluster_list_merged[cc][jj].c2x2_ / cluster_list_merged[cc][jj].c2x5_))
694  photonShowerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 1;
695  else
696  photonShowerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][cc] = 0;
697  }
698 
699  // Loop over calo ecal hits to get the ECAL towers. Take only hits that have not been used to make clusters
700  for (const auto& hit : ecalhits) {
701  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
702  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
703  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
704  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) &&
705  !hit.used()) { // Take all the hits inside the card that have not been used yet
706  for (int jj = 0; jj < n_links_card; ++jj) { // loop over 4 links per card
707  if ((getCrystal_phiID(hit.position().phi()) / n_crystals_towerPhi) % 4 == jj) { // Go to ID tower modulo 4
708  for (int ii = 0; ii < n_towers_per_link; ++ii) {
709  //Apply Mark's calibration at the same time (row of the lowest pT, as a function of eta)
710  if ((getCrystal_etaID(hit.position().eta()) / n_crystals_towerEta) % n_towers_per_link == ii) {
711  ECAL_tower_L1Card[jj][ii][cc] += hit.pt() * calib_(0, std::abs(hit.position().eta()));
712  iEta_tower_L1Card[jj][ii][cc] = getTower_absoluteEtaID(hit.position().eta()); //hit.id().ieta();
713  iPhi_tower_L1Card[jj][ii][cc] = getTower_absolutePhiID(hit.position().phi()); //hit.id().iphi();
714  }
715  } // end of loop over eta towers
716  }
717  } // end of loop over phi links
718  // Make sure towers with 0 ET are initialized with proper iEta, iPhi coordinates
719  static constexpr float tower_width = 0.0873;
720  for (int jj = 0; jj < n_links_card; ++jj) {
721  for (int ii = 0; ii < n_towers_per_link; ++ii) {
722  float phi = getPhiMin_card(cc) * tower_width / n_crystals_towerPhi - M_PI + (jj + 0.5) * tower_width;
723  float eta = getEtaMin_card(cc) * tower_width / n_crystals_towerEta - n_towers_per_link * tower_width +
724  (ii + 0.5) * tower_width;
725  iEta_tower_L1Card[jj][ii][cc] = getTower_absoluteEtaID(eta);
726  iPhi_tower_L1Card[jj][ii][cc] = getTower_absolutePhiID(phi);
727  }
728  }
729 
730  } // end of check if inside card
731  } // end of loop over hits to build towers
732 
733  // Loop over hcal hits to get the HCAL towers.
734  for (const auto& hit : hcalhits) {
735  if (getCrystal_phiID(hit.position().phi()) <= getPhiMax_card(cc) &&
736  getCrystal_phiID(hit.position().phi()) >= getPhiMin_card(cc) &&
737  getCrystal_etaID(hit.position().eta()) <= getEtaMax_card(cc) &&
738  getCrystal_etaID(hit.position().eta()) >= getEtaMin_card(cc) && hit.pt() > 0) {
739  for (int jj = 0; jj < n_links_card; ++jj) {
740  if ((getCrystal_phiID(hit.position().phi()) / n_crystals_towerPhi) % n_links_card == jj) {
741  for (int ii = 0; ii < n_towers_per_link; ++ii) {
742  if ((getCrystal_etaID(hit.position().eta()) / n_crystals_towerEta) % n_towers_per_link == ii) {
743  HCAL_tower_L1Card[jj][ii][cc] += hit.pt();
744  iEta_tower_L1Card[jj][ii][cc] = getTower_absoluteEtaID(hit.position().eta()); //hit.id().ieta();
745  iPhi_tower_L1Card[jj][ii][cc] = getTower_absolutePhiID(hit.position().phi()); //hit.id().iphi();
746  }
747  } // end of loop over eta towers
748  }
749  } // end of loop over phi links
750  } // end of check if inside card
751  } // end of loop over hits to build towers
752 
753  // Give back energy of not used clusters to the towers (if there are more than 12 clusters)
754  for (unsigned int kk = n_clusters_4link; kk < cluster_list_merged[cc].size(); ++kk) {
755  if (cluster_list_merged[cc][kk].cpt > 0) {
756  ECAL_tower_L1Card[getTower_phiID(cluster_list_merged[cc][kk].cphi_)]
757  [getTower_etaID(cluster_list_merged[cc][kk].ceta_)][cc] += cluster_list_merged[cc][kk].cpt;
758  }
759  }
760  } //End of loop over cards
761 
762  //*********************************************************
763  //******************** Do layer 2 *************************
764  //*********************************************************
765 
766  // Definition of L2 outputs
767  float HCAL_tower_L2Card[n_links_GCTcard][n_towers_per_link]
768  [n_GCTcards]; // 3 L2 cards send each 48 links with 17 towers
769  float ECAL_tower_L2Card[n_links_GCTcard][n_towers_per_link][n_GCTcards];
770  int iEta_tower_L2Card[n_links_GCTcard][n_towers_per_link][n_GCTcards];
771  int iPhi_tower_L2Card[n_links_GCTcard][n_towers_per_link][n_GCTcards];
772  float energy_cluster_L2Card[n_links_GCTcard][n_clusters_per_link]
773  [n_GCTcards]; // 3 L2 cards send each 48 links with 2 clusters
774  float brem_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
775  int towerID_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
776  int crystalID_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
777  float isolation_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
778  float HE_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
779  int showerShape_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
780  int showerShapeLooseTk_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
781  int photonShowerShape_cluster_L2Card[n_links_GCTcard][n_clusters_per_link][n_GCTcards];
782 
783  for (int ii = 0; ii < n_links_GCTcard; ++ii) {
784  for (int jj = 0; jj < n_towers_per_link; ++jj) {
785  for (int ll = 0; ll < n_GCTcards; ++ll) {
786  HCAL_tower_L2Card[ii][jj][ll] = 0;
787  ECAL_tower_L2Card[ii][jj][ll] = 0;
788  iEta_tower_L2Card[ii][jj][ll] = 0;
789  iPhi_tower_L2Card[ii][jj][ll] = 0;
790  }
791  }
792  }
793  for (int ii = 0; ii < n_links_GCTcard; ++ii) {
794  for (int jj = 0; jj < n_clusters_per_link; ++jj) {
795  for (int ll = 0; ll < n_GCTcards; ++ll) {
796  energy_cluster_L2Card[ii][jj][ll] = 0;
797  brem_cluster_L2Card[ii][jj][ll] = 0;
798  towerID_cluster_L2Card[ii][jj][ll] = 0;
799  crystalID_cluster_L2Card[ii][jj][ll] = 0;
800  isolation_cluster_L2Card[ii][jj][ll] = 0;
801  HE_cluster_L2Card[ii][jj][ll] = 0;
802  photonShowerShape_cluster_L2Card[ii][jj][ll] = 0;
803  showerShape_cluster_L2Card[ii][jj][ll] = 0;
804  showerShapeLooseTk_cluster_L2Card[ii][jj][ll] = 0;
805  }
806  }
807  }
808 
809  // There is one list of clusters per equivalent of L1 card. We take the 8 highest pt.
810  vector<mycluster> cluster_list_L2[n_towers_halfPhi];
811 
812  // Merge clusters on the phi edges
813  for (int ii = 0; ii < n_borders_phi; ++ii) { // 18 borders in phi
814  for (int jj = 0; jj < n_eta_bins; ++jj) { // 2 eta bins
815  int card_left = 2 * ii + jj;
816  int card_right = 2 * ii + jj + 2;
817  if (card_right > 35)
818  card_right = card_right - n_towers_halfPhi;
819  for (int kk = 0; kk < n_clusters_4link; ++kk) { // 12 clusters in the first card. We check the right side
820  if (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] > 50 &&
821  crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] > 19 &&
822  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] > 0) {
823  for (int ll = 0; ll < n_clusters_4link; ++ll) { // We check the 12 clusters in the card on the right
824  if (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] < n_towers_per_link &&
825  crystalID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] < 5 &&
826  std::abs(
827  5 * (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right]) % n_towers_per_link +
828  crystalID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] % 5 -
829  5 * (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left]) % n_towers_per_link -
830  crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] % 5) < 2) {
831  if (energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] >
832  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right]) {
833  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] +=
834  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right];
835  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] = 0;
836  } // The least energetic cluster is merged to the most energetic one
837  else {
838  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] +=
839  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left];
840  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] = 0;
841  }
842  }
843  }
844  }
845  }
846  }
847  }
848 
849  // Bremsstrahlung corrections. Merge clusters on the phi edges depending on pT (pt more than 10 percent, dphi leq 5, deta leq 1)
850  if (do_brem) {
851  for (int ii = 0; ii < n_borders_phi; ++ii) { // 18 borders in phi
852  for (int jj = 0; jj < n_eta_bins; ++jj) { // 2 eta bins
853  int card_left = 2 * ii + jj;
854  int card_right = 2 * ii + jj + 2;
855  if (card_right > 35)
856  card_right = card_right - n_towers_halfPhi;
857  // 12 clusters in the first card. We check the right side crystalID_cluster_L1Card[kk%4][kk/4][card_left]
858  for (int kk = 0; kk < n_clusters_4link; ++kk) {
859  // if the tower is at the edge there might be brem corrections, whatever the crystal ID
860  if (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] > 50 &&
861  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] > 0) {
862  for (int ll = 0; ll < n_clusters_4link; ++ll) { // We check the 12 clusters in the card on the right
863  //Distance of 1 max in eta
864  if (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] < n_towers_per_link &&
865  std::abs(5 * (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right]) %
867  crystalID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] % 5 -
868  5 * (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left]) %
870  crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] % 5) <= 1) {
871  //Distance of 5 max in phi
872  if (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] < n_towers_per_link &&
873  std::abs(5 + crystalID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] / 5 -
874  (crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] / 5)) <= 5) {
875  if (energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] >
876  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] &&
877  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] >
878  0.10 * energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left]) {
879  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] +=
880  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right];
881  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] = 0;
882  brem_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] = 1;
883  }
884  // The least energetic cluster is merged to the most energetic one, if its pt is at least ten percent
885  else if (energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_right] >=
886  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_left] &&
887  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_left] >
888  0.10 * energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_right]) {
889  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] +=
890  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left];
891  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_left] = 0;
892  brem_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_right] = 1;
893  }
894  } //max distance eta
895  } //max distance phi
896  } //max distance phi
897  }
898  }
899  }
900  }
901  }
902 
903  // Merge clusters on the eta edges
904  for (int ii = 0; ii < n_borders_eta; ++ii) { // 18 borders in eta
905  int card_bottom = 2 * ii;
906  int card_top = 2 * ii + 1;
907  for (int kk = 0; kk < n_clusters_4link; ++kk) { // 12 clusters in the first card. We check the top side
908  if (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] % n_towers_per_link == 16 &&
909  crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] % 5 == n_links_card &&
910  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] >
911  0) { // If there is one cluster on the right side of the first card
912  for (int ll = 0; ll < n_clusters_4link; ++ll) { // We check the card on the right
913  if (std::abs(
914  5 * (towerID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] / n_towers_per_link) +
915  crystalID_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] / 5 -
916  5 * (towerID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_top] / n_towers_per_link) -
917  crystalID_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_top] / 5) < 2) {
918  if (energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] >
919  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_bottom]) {
920  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] +=
921  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_top];
922  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_top] = 0;
923  } else {
924  energy_cluster_L1Card[ll % n_links_card][ll / n_links_card][card_top] +=
925  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom];
926  energy_cluster_L1Card[kk % n_links_card][kk / n_links_card][card_bottom] = 0;
927  }
928  }
929  }
930  }
931  }
932  }
933 
934  // Regroup the new clusters per equivalent of L1 card geometry
935  for (int ii = 0; ii < n_towers_halfPhi; ++ii) {
936  for (int jj = 0; jj < n_clusters_4link; ++jj) {
937  if (energy_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii] > 0) {
938  mycluster mc1;
939  mc1.cpt = energy_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
940  mc1.cbrem_ = brem_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
941  mc1.ctowerid_ = towerID_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
942  mc1.ccrystalid_ = crystalID_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
943  mc1.cshowershape_ = showerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
944  mc1.cshowershapeloosetk_ = showerShapeLooseTk_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
945  mc1.cphotonshowershape_ = photonShowerShape_cluster_L1Card[jj % n_links_card][jj / n_links_card][ii];
946  cluster_list_L2[ii].push_back(mc1);
947  }
948  }
949  std::sort(
950  begin(cluster_list_L2[ii]), end(cluster_list_L2[ii]), [](mycluster a, mycluster b) { return a.cpt > b.cpt; });
951  }
952 
953  // If there are more than 8 clusters per equivalent of L1 card we need to put them back in the towers
954  for (int ii = 0; ii < n_towers_halfPhi; ++ii) {
955  for (unsigned int jj = 8; jj < n_clusters_4link && jj < cluster_list_L2[ii].size(); ++jj) {
956  if (cluster_list_L2[ii][jj].cpt > 0) {
957  ECAL_tower_L1Card[cluster_list_L2[ii][jj].ctowerid_ / n_towers_per_link]
958  [cluster_list_L2[ii][jj].ctowerid_ % n_towers_per_link][ii] += cluster_list_L2[ii][jj].cpt;
959  cluster_list_L2[ii][jj].cpt = 0;
960  cluster_list_L2[ii][jj].ctowerid_ = 0;
961  cluster_list_L2[ii][jj].ccrystalid_ = 0;
962  }
963  }
964  }
965 
966  // Compute isolation (7*7 ECAL towers) and HCAL energy (5x5 HCAL towers)
967  for (int ii = 0; ii < n_towers_halfPhi; ++ii) { // Loop over the new cluster list (stored in 36x8 format)
968  for (unsigned int jj = 0; jj < 8 && jj < cluster_list_L2[ii].size(); ++jj) {
969  int cluster_etaOfTower_fullDetector = get_towerEta_fromCardTowerInCard(ii, cluster_list_L2[ii][jj].ctowerid_);
970  int cluster_phiOfTower_fullDetector = get_towerPhi_fromCardTowerInCard(ii, cluster_list_L2[ii][jj].ctowerid_);
971  float hcal_nrj = 0.0;
972  float isolation = 0.0;
973  int ntowers = 0;
974  for (int iii = 0; iii < n_towers_halfPhi; ++iii) { // The clusters have to be added to the isolation
975  for (unsigned int jjj = 0; jjj < 8 && jjj < cluster_list_L2[iii].size(); ++jjj) {
976  if (!(iii == ii && jjj == jj)) {
977  int cluster2_eta = get_towerEta_fromCardTowerInCard(iii, cluster_list_L2[iii][jjj].ctowerid_);
978  int cluster2_phi = get_towerPhi_fromCardTowerInCard(iii, cluster_list_L2[iii][jjj].ctowerid_);
979  if (abs(cluster2_eta - cluster_etaOfTower_fullDetector) <= 2 &&
980  (abs(cluster2_phi - cluster_phiOfTower_fullDetector) <= 2 or
981  abs(cluster2_phi - n_towers_Phi - cluster_phiOfTower_fullDetector) <= 2)) {
982  isolation += cluster_list_L2[iii][jjj].cpt;
983  }
984  }
985  }
986  }
987  for (int kk = 0; kk < n_towers_halfPhi; ++kk) { // 36 cards
988  for (int ll = 0; ll < n_links_card; ++ll) { // 4 links per card
989  for (int mm = 0; mm < n_towers_per_link; ++mm) { // 17 towers per link
990  int etaOftower_fullDetector = get_towerEta_fromCardLinkTower(kk, ll, mm);
991  int phiOftower_fullDetector = get_towerPhi_fromCardLinkTower(kk, ll, mm);
992  // First do ECAL
993  // The towers are within 3. Needs to stitch the two phi sides together
994  if (abs(etaOftower_fullDetector - cluster_etaOfTower_fullDetector) <= 2 &&
995  (abs(phiOftower_fullDetector - cluster_phiOfTower_fullDetector) <= 2 or
996  abs(phiOftower_fullDetector - n_towers_Phi - cluster_phiOfTower_fullDetector) <= 2)) {
997  // Remove the column outside of the L2 card: values (0,71), (23,26), (24,21), (47,50), (48,50), (71,2)
998  if (!((cluster_phiOfTower_fullDetector == 0 && phiOftower_fullDetector == 71) or
999  (cluster_phiOfTower_fullDetector == 23 && phiOftower_fullDetector == 26) or
1000  (cluster_phiOfTower_fullDetector == 24 && phiOftower_fullDetector == 21) or
1001  (cluster_phiOfTower_fullDetector == 47 && phiOftower_fullDetector == 50) or
1002  (cluster_phiOfTower_fullDetector == 48 && phiOftower_fullDetector == 45) or
1003  (cluster_phiOfTower_fullDetector == 71 && phiOftower_fullDetector == 2))) {
1004  isolation += ECAL_tower_L1Card[ll][mm][kk];
1005  ntowers++;
1006  }
1007  }
1008  // Now do HCAL
1009  // The towers are within 2. Needs to stitch the two phi sides together
1010  if (abs(etaOftower_fullDetector - cluster_etaOfTower_fullDetector) <= 2 &&
1011  (abs(phiOftower_fullDetector - cluster_phiOfTower_fullDetector) <= 2 or
1012  abs(phiOftower_fullDetector - n_towers_Phi - cluster_phiOfTower_fullDetector) <= 2)) {
1013  hcal_nrj += HCAL_tower_L1Card[ll][mm][kk];
1014  }
1015  }
1016  }
1017  }
1018  cluster_list_L2[ii][jj].ciso_ = ((isolation) * (25.0 / ntowers)) / cluster_list_L2[ii][jj].cpt;
1019  cluster_list_L2[ii][jj].chovere_ = hcal_nrj / cluster_list_L2[ii][jj].cpt;
1020  }
1021  }
1022 
1023  //Reformat the information inside the 3 L2 cards
1024  //First let's fill the towers
1025  for (int ii = 0; ii < n_links_GCTcard; ++ii) {
1026  for (int jj = 0; jj < n_towers_per_link; ++jj) {
1027  for (int ll = 0; ll < 3; ++ll) {
1028  ECAL_tower_L2Card[ii][jj][ll] =
1030  HCAL_tower_L2Card[ii][jj][ll] =
1032  iEta_tower_L2Card[ii][jj][ll] =
1034  iPhi_tower_L2Card[ii][jj][ll] =
1036  }
1037  }
1038  }
1039 
1040  //Second let's fill the clusters
1041  for (int ii = 0; ii < n_towers_halfPhi; ++ii) { // The cluster list is still in the L1 like geometry
1042  for (unsigned int jj = 0; jj < unsigned(cluster_list_L2[ii].size()) && jj < n_clusters_4link; ++jj) {
1043  crystalID_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1044  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].ccrystalid_;
1045  towerID_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1046  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].ctowerid_;
1047  energy_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1048  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].cpt;
1049  brem_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1050  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].cbrem_;
1051  isolation_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1052  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].ciso_;
1053  HE_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1054  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].chovere_;
1055  showerShape_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1056  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].cshowershape_;
1057  showerShapeLooseTk_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1058  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].cshowershapeloosetk_;
1059  photonShowerShape_cluster_L2Card[n_links_card * (ii % n_clusters_4link) + jj % n_links_card][jj / n_links_card]
1060  [ii / n_clusters_4link] = cluster_list_L2[ii][jj].cphotonshowershape_;
1061  }
1062  }
1063 
1064  auto L1EGXtalClusters = std::make_unique<l1tp2::CaloCrystalClusterCollection>();
1065  auto L1EGammas = std::make_unique<l1t::EGammaBxCollection>();
1066  auto L1CaloTowers = std::make_unique<l1tp2::CaloTowerCollection>();
1067 
1068  // Fill the cluster collection and towers as well
1069  for (int ii = 0; ii < n_links_GCTcard; ++ii) { // 48 links
1070  for (int ll = 0; ll < n_GCTcards; ++ll) { // 3 cards
1071  // For looping over the Towers a few lines below
1072  for (int jj = 0; jj < 2; ++jj) { // 2 L1EGs
1073  if (energy_cluster_L2Card[ii][jj][ll] > 0.45) {
1075  energy_cluster_L2Card[ii][jj][ll],
1077  ii, ll, towerID_cluster_L2Card[ii][jj][ll], crystalID_cluster_L2Card[ii][jj][ll]),
1079  ii, ll, towerID_cluster_L2Card[ii][jj][ll], crystalID_cluster_L2Card[ii][jj][ll]),
1080  0.);
1081  SimpleCaloHit centerhit;
1082  bool is_iso = passes_iso(energy_cluster_L2Card[ii][jj][ll], isolation_cluster_L2Card[ii][jj][ll]);
1083  bool is_looseTkiso =
1084  passes_looseTkiso(energy_cluster_L2Card[ii][jj][ll], isolation_cluster_L2Card[ii][jj][ll]);
1085  bool is_ss = (showerShape_cluster_L2Card[ii][jj][ll] == 1);
1086  bool is_photon = (photonShowerShape_cluster_L2Card[ii][jj][ll] == 1) && is_ss && is_iso;
1087  bool is_looseTkss = (showerShapeLooseTk_cluster_L2Card[ii][jj][ll] == 1);
1088  // All the ID set to Standalone WP! Some dummy values for non calculated variables
1089  l1tp2::CaloCrystalCluster cluster(p4calibrated,
1090  energy_cluster_L2Card[ii][jj][ll],
1091  HE_cluster_L2Card[ii][jj][ll],
1092  isolation_cluster_L2Card[ii][jj][ll],
1093  centerhit.id(),
1094  -1000,
1095  float(brem_cluster_L2Card[ii][jj][ll]),
1096  -1000,
1097  -1000,
1098  energy_cluster_L2Card[ii][jj][ll],
1099  -1,
1100  is_iso&& is_ss,
1101  is_iso&& is_ss,
1102  is_photon,
1103  is_iso&& is_ss,
1104  is_looseTkiso&& is_looseTkss,
1105  is_iso&& is_ss);
1106  // Experimental parameters, don't want to bother with hardcoding them in data format
1107  std::map<std::string, float> params;
1108  params["standaloneWP_showerShape"] = is_ss;
1109  params["standaloneWP_isolation"] = is_iso;
1110  params["trkMatchWP_showerShape"] = is_looseTkss;
1111  params["trkMatchWP_isolation"] = is_looseTkiso;
1112  params["TTiEta"] = getToweriEta_fromAbsoluteID(getTower_absoluteEtaID(p4calibrated.eta()));
1113  params["TTiPhi"] = getToweriPhi_fromAbsoluteID(getTower_absolutePhiID(p4calibrated.phi()));
1114  cluster.setExperimentalParams(params);
1115  L1EGXtalClusters->push_back(cluster);
1116 
1117  int standaloneWP = (int)(is_iso && is_ss);
1118  int looseL1TkMatchWP = (int)(is_looseTkiso && is_looseTkss);
1119  int photonWP = (int)(is_photon);
1120  int quality =
1121  (standaloneWP * std::pow(2, 0)) + (looseL1TkMatchWP * std::pow(2, 1)) + (photonWP * std::pow(2, 2));
1122  L1EGammas->push_back(
1123  0, l1t::EGamma(p4calibrated, p4calibrated.pt(), p4calibrated.eta(), p4calibrated.phi(), quality, 1));
1124  }
1125  }
1126  }
1127  }
1128 
1129  for (int ii = 0; ii < n_links_GCTcard; ++ii) { // 48 links
1130  for (int ll = 0; ll < n_GCTcards; ++ll) { // 3 cards
1131  // Fill the tower collection
1132  for (int jj = 0; jj < n_towers_per_link; ++jj) { // 17 TTs
1133  l1tp2::CaloTower l1CaloTower;
1134  l1CaloTower.setEcalTowerEt(ECAL_tower_L2Card[ii][jj][ll]);
1135  l1CaloTower.setHcalTowerEt(HCAL_tower_L2Card[ii][jj][ll]);
1136  l1CaloTower.setTowerIEta(getToweriEta_fromAbsoluteID(iEta_tower_L2Card[ii][jj][ll]));
1137  l1CaloTower.setTowerIPhi(getToweriPhi_fromAbsoluteID(iPhi_tower_L2Card[ii][jj][ll]));
1138  l1CaloTower.setTowerEta(getTowerEta_fromAbsoluteID(iEta_tower_L2Card[ii][jj][ll]));
1139  l1CaloTower.setTowerPhi(getTowerPhi_fromAbsoluteID(iPhi_tower_L2Card[ii][jj][ll]));
1140  // Some towers have incorrect eta/phi because that wasn't initialized in certain cases, fix these
1141  static float constexpr towerEtaUpperUnitialized = -80;
1142  static float constexpr towerPhiUpperUnitialized = -90;
1143  if (l1CaloTower.towerEta() < towerEtaUpperUnitialized && l1CaloTower.towerPhi() < towerPhiUpperUnitialized) {
1144  l1CaloTower.setTowerEta(l1t::CaloTools::towerEta(l1CaloTower.towerIEta()));
1145  l1CaloTower.setTowerPhi(l1t::CaloTools::towerPhi(l1CaloTower.towerIEta(), l1CaloTower.towerIPhi()));
1146  }
1147  l1CaloTower.setIsBarrel(true);
1148 
1149  // Add L1EGs if they match in iEta / iPhi
1150  // L1EGs are already pT ordered, we will take the ID info for the leading one, but pT as the sum
1151  for (const auto& l1eg : *L1EGXtalClusters) {
1152  if (l1eg.experimentalParam("TTiEta") != l1CaloTower.towerIEta())
1153  continue;
1154  if (l1eg.experimentalParam("TTiPhi") != l1CaloTower.towerIPhi())
1155  continue;
1156 
1157  int n_L1eg = l1CaloTower.nL1eg();
1158  l1CaloTower.setNL1eg(n_L1eg++);
1159  l1CaloTower.setL1egTowerEt(l1CaloTower.l1egTowerEt() + l1eg.pt());
1160  // Don't record L1EG quality info for subleading L1EG
1161  if (l1CaloTower.nL1eg() > 1)
1162  continue;
1163  l1CaloTower.setL1egTrkSS(l1eg.experimentalParam("trkMatchWP_showerShape"));
1164  l1CaloTower.setL1egTrkIso(l1eg.experimentalParam("trkMatchWP_isolation"));
1165  l1CaloTower.setL1egStandaloneSS(l1eg.experimentalParam("standaloneWP_showerShape"));
1166  l1CaloTower.setL1egStandaloneIso(l1eg.experimentalParam("standaloneWP_isolation"));
1167  }
1168 
1169  L1CaloTowers->push_back(l1CaloTower);
1170  }
1171  }
1172  }
1173 
1174  iEvent.put(std::move(L1EGXtalClusters));
1175  iEvent.put(std::move(L1EGammas));
1176  iEvent.put(std::move(L1CaloTowers));
1177 }
1178 
1180  bool is_iso = true;
1181  if (pt < slideIsoPtThreshold) {
1182  if (!((a0_80 - a1_80 * pt) > iso))
1183  is_iso = false;
1184  } else {
1185  if (iso > a0)
1186  is_iso = false;
1187  }
1188  if (pt > plateau_ss)
1189  is_iso = true;
1190  return is_iso;
1191 }
1192 
1194  bool is_iso = (b0 + b1 * std::exp(-b2 * pt) > iso);
1195  if (pt > plateau_ss)
1196  is_iso = true;
1197  return is_iso;
1198 }
1199 
1201  bool is_ss = ((c0_ss + c1_ss * std::exp(-c2_ss * pt)) <= ss);
1202  if (pt > plateau_ss)
1203  is_ss = true;
1204  return is_ss;
1205 }
1206 
1208  bool is_ss = (pss > d0 - d1 * pt);
1209  if (pt > plateau_ss)
1210  is_ss = true;
1211  return is_ss;
1212 }
1213 
1215  bool is_ss = ((e0_looseTkss - e1_looseTkss * std::exp(-e2_looseTkss * pt)) <= ss);
1216  if (pt > plateau_ss)
1217  is_ss = true;
1218  return is_ss;
1219 }
1220 
1221 //define this as a plug-in
Vector3DBase
Definition: Vector3DBase.h:8
getTower_etaID
int getTower_etaID(int cluster_etaID)
Definition: L1EGammaCrystalsEmulatorProducer.cc:195
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::energy_
float energy_
Definition: L1EGammaCrystalsEmulatorProducer.cc:280
CaloTower.h
getEtaMax_card
int getEtaMax_card(int card)
Definition: L1EGammaCrystalsEmulatorProducer.cc:199
PI
Definition: PayloadInspector.h:21
l1tp2::CaloTower::towerIEta
int towerIEta() const
Definition: CaloTower.h:38
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1EGCrystalClusterEmulatorProducer::passes_ss
bool passes_ss(float pt, float ss)
Definition: L1EGammaCrystalsEmulatorProducer.cc:1200
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::dieta
int dieta(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:306
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EcalBarrelGeometry.h
convert_L2toL1_tower
int convert_L2toL1_tower(int tower)
Definition: L1EGammaCrystalsEmulatorProducer.cc:122
CaloTools.h
MessageLogger.h
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
l1tp2::CaloTower::towerEta
float towerEta() const
Definition: CaloTower.h:40
L1EGCrystalClusterEmulatorProducer::mycluster::cWeightedPhi_
float cWeightedPhi_
Definition: L1EGammaCrystalsEmulatorProducer.cc:264
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
edm::Handle::product
T const * product() const
Definition: Handle.h:70
getPhiMax_card
int getPhiMax_card(int card)
Definition: L1EGammaCrystalsEmulatorProducer.cc:217
getTowerID
int getTowerID(int etaID, int phiID)
Definition: L1EGammaCrystalsEmulatorProducer.cc:186
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setEnergy
void setEnergy(float et)
Definition: L1EGammaCrystalsEmulatorProducer.cc:291
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
getTower_absoluteEtaID
int getTower_absoluteEtaID(float eta)
Definition: L1EGammaCrystalsEmulatorProducer.cc:132
ESHandle.h
L1EGCrystalClusterEmulatorProducer::ecalTPEBToken_
edm::EDGetTokenT< EcalEBTrigPrimDigiCollection > ecalTPEBToken_
Definition: L1EGammaCrystalsEmulatorProducer.cc:241
l1tp2::CaloTower::setTowerPhi
void setTowerPhi(float phi)
Definition: CaloTower.h:53
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::position_
GlobalVector position_
Definition: L1EGammaCrystalsEmulatorProducer.cc:284
PI
#define PI
Definition: QcdUeDQM.h:37
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
slideIsoPtThreshold
static constexpr float slideIsoPtThreshold
Definition: L1EGammaCrystalsEmulatorProducer.cc:80
phimin
float phimin
Definition: ReggeGribovPartonMCHadronizer.h:107
edm::EDGetTokenT
Definition: EDGetToken.h:33
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::deta
float deta(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:305
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
pss
std::pair< ALIstring, ALIstring > pss
Definition: Fit.h:25
getCrystalIDInTower
int getCrystalIDInTower(int etaID, int phiID)
Definition: L1EGammaCrystalsEmulatorProducer.cc:170
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setIdHcal
void setIdHcal(const HcalDetId &idhcal)
Definition: L1EGammaCrystalsEmulatorProducer.cc:295
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::isEndcapHit
bool isEndcapHit() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:300
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::stale_
bool stale_
Definition: L1EGammaCrystalsEmulatorProducer.cc:282
pos
Definition: PixelAliasList.h:18
HcalTopology
Definition: HcalTopology.h:26
L1EGCrystalClusterEmulatorProducer::decoder_
edm::ESHandle< CaloTPGTranscoder > decoder_
Definition: L1EGammaCrystalsEmulatorProducer.cc:243
L1EGCrystalClusterEmulatorProducer::mycluster::c2x5_
float c2x5_
Definition: L1EGammaCrystalsEmulatorProducer.cc:255
DetId::Hcal
Definition: DetId.h:28
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setPosition
void setPosition(const GlobalVector &pos)
Definition: L1EGammaCrystalsEmulatorProducer.cc:294
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
n_towers_Phi
static constexpr int n_towers_Phi
Definition: L1EGammaCrystalsEmulatorProducer.cc:73
L1EGCrystalClusterEmulatorProducer::mycluster::cbrem_
int cbrem_
Definition: L1EGammaCrystalsEmulatorProducer.cc:262
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
l1tp2::CaloTower::setL1egTowerEt
void setL1egTowerEt(float et)
Definition: CaloTower.h:55
n_links_card
static constexpr int n_links_card
Definition: L1EGammaCrystalsEmulatorProducer.cc:75
EDProducer.h
edm::SortedCollection
Definition: SortedCollection.h:49
L1EGCrystalClusterEmulatorProducer::mycluster::ctowerid_
int ctowerid_
Definition: L1EGammaCrystalsEmulatorProducer.cc:274
L1EGCrystalClusterEmulatorProducer::mycluster::craweta_
float craweta_
Definition: L1EGammaCrystalsEmulatorProducer.cc:267
L1EGCrystalClusterEmulatorProducer::mycluster::cWeightedEta_
float cWeightedEta_
Definition: L1EGammaCrystalsEmulatorProducer.cc:263
L1EGCrystalClusterEmulatorProducer::mycluster::chcal_
float chcal_
Definition: L1EGammaCrystalsEmulatorProducer.cc:269
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::id_hcal_
HcalDetId id_hcal_
Definition: L1EGammaCrystalsEmulatorProducer.cc:285
do_brem
static constexpr bool do_brem
Definition: L1EGammaCrystalsEmulatorProducer.cc:59
l1tp2::CaloTower::setHcalTowerEt
void setHcalTowerEt(float et)
Definition: CaloTower.h:50
a1_80
static constexpr float a1_80
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
getEtaMin_card
int getEtaMin_card(int card)
Definition: L1EGammaCrystalsEmulatorProducer.cc:208
n_towers_Eta
static constexpr int n_towers_Eta
Definition: L1EGammaCrystalsEmulatorProducer.cc:72
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
HcalBarrel
Definition: HcalAssistant.h:33
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
CaloTPGTranscoder.h
toweriPhi_fromAbsoluteID_shift_upperHalf
static constexpr int toweriPhi_fromAbsoluteID_shift_upperHalf
Definition: L1EGammaCrystalsEmulatorProducer.cc:98
n_towers_halfPhi
static constexpr int n_towers_halfPhi
Definition: L1EGammaCrystalsEmulatorProducer.cc:74
PV3DBase::mag2
T mag2() const
Definition: PV3DBase.h:63
getPhi_fromL2LinkCardTowerCrystal
float getPhi_fromL2LinkCardTowerCrystal(int link, int card, int tower, int crystal)
Definition: L1EGammaCrystalsEmulatorProducer.cc:107
edm::Handle
Definition: AssociativeIterator.h:50
L1EGCrystalClusterEmulatorProducer::passes_looseTkss
bool passes_looseTkss(float pt, float ss)
Definition: L1EGammaCrystalsEmulatorProducer.cc:1214
EcalBarrel
Definition: EcalSubdetector.h:10
n_borders_phi
static constexpr int n_borders_phi
Definition: L1EGammaCrystalsEmulatorProducer.cc:62
n_clusters_max
static constexpr int n_clusters_max
Definition: L1EGammaCrystalsEmulatorProducer.cc:64
ParametricCalibration.h
muonTiming_cfi.etamin
etamin
Definition: muonTiming_cfi.py:30
HcalTriggerPrimitiveDigi.h
L1EGCrystalClusterEmulatorProducer::mycluster::crawphi_
float crawphi_
Definition: L1EGammaCrystalsEmulatorProducer.cc:268
L1EGCrystalClusterEmulatorProducer::mycluster::c2x2_
float c2x2_
Definition: L1EGammaCrystalsEmulatorProducer.cc:254
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
cc
l1tp2::CaloTower::nL1eg
int nL1eg() const
Definition: CaloTower.h:42
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::energy
float energy() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:299
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::pt_
float pt_
Definition: L1EGammaCrystalsEmulatorProducer.cc:279
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
convert_L2toL1_card
int convert_L2toL1_card(int card, int link)
Definition: L1EGammaCrystalsEmulatorProducer.cc:124
MakerMacros.h
L1EGCrystalClusterEmulatorProducer::~L1EGCrystalClusterEmulatorProducer
~L1EGCrystalClusterEmulatorProducer() override
Definition: L1EGammaCrystalsEmulatorProducer.cc:350
L1EGCrystalClusterEmulatorProducer::mycluster::cpt
float cpt
Definition: L1EGammaCrystalsEmulatorProducer.cc:261
n_borders_eta
static constexpr int n_borders_eta
Definition: L1EGammaCrystalsEmulatorProducer.cc:63
l1t::CaloTools::towerPhi
static float towerPhi(int ieta, int iphi)
Definition: CaloTools.cc:208
e0_looseTkss
static constexpr float e0_looseTkss
Definition: L1EGammaCrystalsEmulatorProducer.cc:86
getTower_absolutePhiID
int getTower_absolutePhiID(float phi)
Definition: L1EGammaCrystalsEmulatorProducer.cc:138
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
L1EGCrystalClusterEmulatorProducer::ebGeometry
const CaloSubdetectorGeometry * ebGeometry
Definition: L1EGammaCrystalsEmulatorProducer.cc:248
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
e2_looseTkss
static constexpr float e2_looseTkss
Definition: L1EGammaCrystalsEmulatorProducer.cc:86
getCrystal_phiID
int getCrystal_phiID(float phi)
Definition: L1EGammaCrystalsEmulatorProducer.cc:126
EGamma.h
getEta_fromL2LinkCardTowerCrystal
float getEta_fromL2LinkCardTowerCrystal(int link, int card, int tower, int crystal)
Definition: L1EGammaCrystalsEmulatorProducer.cc:100
n_towers_per_link
static constexpr int n_towers_per_link
Definition: L1EGammaCrystalsEmulatorProducer.cc:70
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1EGCrystalClusterEmulatorProducer::hbGeometry
const CaloSubdetectorGeometry * hbGeometry
Definition: L1EGammaCrystalsEmulatorProducer.cc:249
l1tp2::CaloCrystalCluster
Definition: CaloCrystalCluster.h:13
mps_fire.end
end
Definition: mps_fire.py:242
EcalDigiCollections.h
edm::ESHandle< CaloTPGTranscoder >
c2_ss
static constexpr float c2_ss
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::position
const GlobalVector & position() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:302
convert_L2toL1_link
int convert_L2toL1_link(int link)
Definition: L1EGammaCrystalsEmulatorProducer.cc:120
L1EGCrystalClusterEmulatorProducer::mycluster::ceta_
float ceta_
Definition: L1EGammaCrystalsEmulatorProducer.cc:270
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::id_
EBDetId id_
Definition: L1EGammaCrystalsEmulatorProducer.cc:286
l1tp2::CaloTower::setL1egStandaloneIso
void setL1egStandaloneIso(int staIso)
Definition: CaloTower.h:60
half_crystal_size
static constexpr float half_crystal_size
Definition: L1EGammaCrystalsEmulatorProducer.cc:79
trackingPlots.other
other
Definition: trackingPlots.py:1460
GetRecoTauVFromDQM_MC_cff.kk
kk
Definition: GetRecoTauVFromDQM_MC_cff.py:84
HcalTopology::validHT
bool validHT(const HcalTrigTowerDetId &id) const
Definition: HcalTopology.cc:239
c0_ss
static constexpr float c0_ss
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
n_links_GCTcard
static constexpr int n_links_GCTcard
Definition: L1EGammaCrystalsEmulatorProducer.cc:76
n_GCTcards
static constexpr int n_GCTcards
Definition: L1EGammaCrystalsEmulatorProducer.cc:77
b
double b
Definition: hdecay.h:118
l1tp2::CaloTower
Definition: CaloTower.h:16
getCrystal_etaID
int getCrystal_etaID(float eta)
Definition: L1EGammaCrystalsEmulatorProducer.cc:114
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
getToweriEta_fromAbsoluteID
int getToweriEta_fromAbsoluteID(int id)
Definition: L1EGammaCrystalsEmulatorProducer.cc:144
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setId
void setId(const EBDetId &id)
Definition: L1EGammaCrystalsEmulatorProducer.cc:296
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::distanceTo
float distanceTo(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:328
L1EGCrystalClusterEmulatorProducer
Definition: L1EGammaCrystalsEmulatorProducer.cc:227
getTower_phiID
int getTower_phiID(int cluster_phiID)
Definition: L1EGammaCrystalsEmulatorProducer.cc:191
L1EGCrystalClusterEmulatorProducer::caloGeometry_
edm::ESHandle< CaloGeometry > caloGeometry_
Definition: L1EGammaCrystalsEmulatorProducer.cc:247
HcalTriggerPrimitiveDigi
Definition: HcalTriggerPrimitiveDigi.h:13
L1EGCrystalClusterEmulatorProducer::mycluster::chovere_
float chovere_
Definition: L1EGammaCrystalsEmulatorProducer.cc:266
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
Event.h
ParameterSet
Definition: Functions.h:16
c1_ss
static constexpr float c1_ss
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
PVValHelper::phi
Definition: PVValidationHelpers.h:69
getPhiMin_card
int getPhiMin_card(int card)
Definition: L1EGammaCrystalsEmulatorProducer.cc:222
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::dphi
float dphi(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:313
CaloTPGRecord
Definition: CaloTPGRecord.h:26
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
toweriPhi_fromAbsoluteID_shift_lowerHalf
static constexpr int toweriPhi_fromAbsoluteID_shift_lowerHalf
Definition: L1EGammaCrystalsEmulatorProducer.cc:97
HcalDetId.h
L1EGCrystalClusterEmulatorProducer::calib_
l1tp2::ParametricCalibration calib_
Definition: L1EGammaCrystalsEmulatorProducer.cc:245
n_crystals_towerPhi
static constexpr int n_crystals_towerPhi
Definition: L1EGammaCrystalsEmulatorProducer.cc:68
L1EGCrystalClusterEmulatorProducer::hcalTPToken_
edm::EDGetTokenT< edm::SortedCollection< HcalTriggerPrimitiveDigi > > hcalTPToken_
Definition: L1EGammaCrystalsEmulatorProducer.cc:242
n_crystals_towerEta
static constexpr int n_crystals_towerEta
Definition: L1EGammaCrystalsEmulatorProducer.cc:67
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::used_
bool used_
Definition: L1EGammaCrystalsEmulatorProducer.cc:283
l1tp2::CaloTower::setTowerEta
void setTowerEta(float eta)
Definition: CaloTower.h:54
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
l1tp2::CaloTower::setEcalTowerEt
void setEcalTowerEt(float et)
Definition: CaloTower.h:49
n_clusters_4link
static constexpr int n_clusters_4link
Definition: L1EGammaCrystalsEmulatorProducer.cc:66
iEvent
int iEvent
Definition: GenABIO.cc:224
l1tp2::CaloTower::towerIPhi
int towerIPhi() const
Definition: CaloTower.h:37
L1EGCrystalClusterEmulatorProducer::passes_looseTkiso
bool passes_looseTkiso(float pt, float iso)
Definition: L1EGammaCrystalsEmulatorProducer.cc:1193
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
l1tp2::CaloTower::setL1egStandaloneSS
void setL1egStandaloneSS(int staSS)
Definition: CaloTower.h:59
L1EGCrystalClusterEmulatorProducer::mycluster::cphotonshowershape_
int cphotonshowershape_
Definition: L1EGammaCrystalsEmulatorProducer.cc:260
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::isEndcapHit_
bool isEndcapHit_
Definition: L1EGammaCrystalsEmulatorProducer.cc:281
l1tp2::CaloTower::setTowerIPhi
void setTowerIPhi(int iPhi)
Definition: CaloTower.h:51
n_clusters_link
static constexpr int n_clusters_link
Definition: L1EGammaCrystalsEmulatorProducer.cc:65
edm::stream::EDProducer
Definition: EDProducer.h:38
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setIsEndcapHit
void setIsEndcapHit(bool isEC)
Definition: L1EGammaCrystalsEmulatorProducer.cc:292
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
l1t::EGamma
Definition: EGamma.h:20
b0
static constexpr float b0
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
l1tp2::CaloTower::towerPhi
float towerPhi() const
Definition: CaloTower.h:39
CaloSubdetectorGeometry::getGeometry
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.
Definition: CaloSubdetectorGeometry.cc:36
L1EGCrystalClusterEmulatorProducer::mycluster::c5x5_
float c5x5_
Definition: L1EGammaCrystalsEmulatorProducer.cc:256
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
HcalTrigTowerGeometry.h
CaloCrystalCluster.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
l1tp2::ParametricCalibration
Definition: ParametricCalibration.h:12
DetId::Ecal
Definition: DetId.h:27
HcalTrigTowerGeometry
Definition: HcalTrigTowerGeometry.h:10
CaloTPGRecord.h
get
#define get
L1EGCrystalClusterEmulatorProducer::mycluster::cshowershape_
int cshowershape_
Definition: L1EGammaCrystalsEmulatorProducer.cc:257
get_towerEta_fromCardTowerInCard
int get_towerEta_fromCardTowerInCard(int card, int towerincard)
Definition: L1EGammaCrystalsEmulatorProducer.cc:174
a0_80
static constexpr float a0_80
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setUsed
void setUsed(bool isUsed)
Definition: L1EGammaCrystalsEmulatorProducer.cc:293
e1_looseTkss
static constexpr float e1_looseTkss
Definition: L1EGammaCrystalsEmulatorProducer.cc:86
L1EGCrystalClusterEmulatorProducer::get_calibrate
float get_calibrate(float uncorr)
phimax
float phimax
Definition: ReggeGribovPartonMCHadronizer.h:106
DDAxes::phi
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
L1EGCrystalClusterEmulatorProducer::passes_iso
bool passes_iso(float pt, float iso)
Definition: L1EGammaCrystalsEmulatorProducer.cc:1179
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::setPt
void setPt()
Definition: L1EGammaCrystalsEmulatorProducer.cc:290
L1EGCrystalClusterEmulatorProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: L1EGammaCrystalsEmulatorProducer.cc:352
l1t::CaloTools::towerEta
static float towerEta(int ieta)
Definition: CaloTools.cc:201
l1tp2::CaloTower::setIsBarrel
void setIsBarrel(bool isBarrel)
Definition: CaloTower.h:61
get_towerEta_fromCardLinkTower
int get_towerEta_fromCardLinkTower(int card, int link, int tower)
Definition: L1EGammaCrystalsEmulatorProducer.cc:182
L1EGCrystalClusterEmulatorProducer::mycluster::cinsidecrystalid_
int cinsidecrystalid_
Definition: L1EGammaCrystalsEmulatorProducer.cc:273
n_crystals_3towers
static constexpr int n_crystals_3towers
Definition: L1EGammaCrystalsEmulatorProducer.cc:69
Exception
Definition: hltDiff.cc:245
muonTiming_cfi.etamax
etamax
Definition: muonTiming_cfi.py:23
CaloGeometry.h
l1tp2::CaloTower::setL1egTrkIso
void setL1egTrkIso(int trkIso)
Definition: CaloTower.h:58
toweriEta_fromAbsoluteID_shift
static constexpr int toweriEta_fromAbsoluteID_shift
Definition: L1EGammaCrystalsEmulatorProducer.cc:92
l1tp2::CaloTower::setNL1eg
void setNL1eg(int n)
Definition: CaloTower.h:56
plateau_ss
static constexpr float plateau_ss
Definition: L1EGammaCrystalsEmulatorProducer.cc:81
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
L1EGCrystalClusterEmulatorProducer::hcTopology_
const HcalTopology * hcTopology_
Definition: L1EGammaCrystalsEmulatorProducer.cc:251
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::used
bool used() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:301
EventSetup.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
cut_500_MeV
static constexpr float cut_500_MeV
Definition: L1EGammaCrystalsEmulatorProducer.cc:87
L1EGCrystalClusterEmulatorProducer::mycluster::cshowershapeloosetk_
int cshowershapeloosetk_
Definition: L1EGammaCrystalsEmulatorProducer.cc:258
L1EGCrystalClusterEmulatorProducer::mycluster::ciso_
float ciso_
Definition: L1EGammaCrystalsEmulatorProducer.cc:265
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::operator==
bool operator==(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:333
ECAL_eta_range
static constexpr float ECAL_eta_range
Definition: L1EGammaCrystalsEmulatorProducer.cc:78
L1EGCrystalClusterEmulatorProducer::L1EGCrystalClusterEmulatorProducer
L1EGCrystalClusterEmulatorProducer(const edm::ParameterSet &)
Definition: L1EGammaCrystalsEmulatorProducer.cc:340
CaloTPGTranscoder::hcaletValue
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0
L1EGCrystalClusterEmulatorProducer::mycluster::cvalueshowershape_
float cvalueshowershape_
Definition: L1EGammaCrystalsEmulatorProducer.cc:259
L1EGCrystalClusterEmulatorProducer::mycluster
Definition: L1EGammaCrystalsEmulatorProducer.cc:253
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
get_towerPhi_fromCardLinkTower
int get_towerPhi_fromCardLinkTower(int card, int link, int tower)
Definition: L1EGammaCrystalsEmulatorProducer.cc:184
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
getTowerEta_fromAbsoluteID
float getTowerEta_fromAbsoluteID(int id)
Definition: L1EGammaCrystalsEmulatorProducer.cc:158
get_towerPhi_fromCardTowerInCard
int get_towerPhi_fromCardTowerInCard(int card, int towerincard)
Definition: L1EGammaCrystalsEmulatorProducer.cc:178
n_eta_bins
static constexpr int n_eta_bins
Definition: L1EGammaCrystalsEmulatorProducer.cc:61
l1tp2::CaloTower::setL1egTrkSS
void setL1egTrkSS(int trkSS)
Definition: CaloTower.h:57
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
L1EGCrystalClusterEmulatorProducer::mycluster::ccrystalid_
int ccrystalid_
Definition: L1EGammaCrystalsEmulatorProducer.cc:272
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit
Definition: L1EGammaCrystalsEmulatorProducer.cc:277
edm::Event
Definition: Event.h:73
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::pt
float pt() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:298
L1EGCrystalClusterEmulatorProducer::hbTopology
edm::ESHandle< HcalTopology > hbTopology
Definition: L1EGammaCrystalsEmulatorProducer.cc:250
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
l1tp2::CaloTower::l1egTowerEt
float l1egTowerEt() const
Definition: CaloTower.h:41
a0
static constexpr float a0
Definition: L1EGammaCrystalsEmulatorProducer.cc:82
L1EGCrystalClusterEmulatorProducer::mycluster::cphi_
float cphi_
Definition: L1EGammaCrystalsEmulatorProducer.cc:271
l1tp2::CaloTower::setTowerIEta
void setTowerIEta(int iEta)
Definition: CaloTower.h:52
getTowerPhi_fromAbsoluteID
float getTowerPhi_fromAbsoluteID(int id)
Definition: L1EGammaCrystalsEmulatorProducer.cc:164
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::diphi
int diphi(SimpleCaloHit &other) const
Definition: L1EGammaCrystalsEmulatorProducer.cc:316
cuy.ii
ii
Definition: cuy.py:590
L1EGCrystalClusterEmulatorProducer::passes_photon
bool passes_photon(float pt, float pss)
Definition: L1EGammaCrystalsEmulatorProducer.cc:1207
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
HcalTrigTowerGeometry::detIds
std::vector< HcalDetId > detIds(const HcalTrigTowerDetId &) const
Definition: HcalTrigTowerGeometry.cc:84
d1
static constexpr float d1
Definition: L1EGammaCrystalsEmulatorProducer.cc:85
isolation
double isolation
Definition: AssociatedVariableMaxCutCandRefSelector.cc:25
hit
Definition: SiStripHitEffFromCalibTree.cc:88
L1EGCrystalClusterEmulatorProducer::SimpleCaloHit::id
const EBDetId & id() const
Definition: L1EGammaCrystalsEmulatorProducer.cc:303
n_clusters_per_link
static constexpr int n_clusters_per_link
Definition: L1EGammaCrystalsEmulatorProducer.cc:71
getToweriPhi_fromAbsoluteID
int getToweriPhi_fromAbsoluteID(int id)
Definition: L1EGammaCrystalsEmulatorProducer.cc:151
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443