CMS 3D CMS Logo

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