CMS 3D CMS Logo

PFRecHitQTests.h
Go to the documentation of this file.
1 #ifndef RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h
2 #define RecoParticleFlow_PFClusterProducer_PFEcalRecHitQTests_h
3 
4 #include <memory>
8 
9 #include <iostream>
10 
11 //
12 // Quality test that checks threshold
13 //
15  public:
17 
18  }
19 
21  PFRecHitQTestBase(iConfig)
22  {
23  threshold_ = iConfig.getParameter<double>("threshold");
24 
25  }
26 
27  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
28  }
29 
30  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
31  return fullReadOut || pass(hit);
32  }
33  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
34  return pass(hit);
35  }
36 
37  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
38  return pass(hit);
39  }
40  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
41  return pass(hit);
42  }
43 
44  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
45  return pass(hit);
46  }
47 
48  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
49  return pass(hit);
50  }
51 
52  protected:
53  double threshold_;
54 
55  bool pass(const reco::PFRecHit& hit){
56  if (hit.energy()>threshold_) return true;
57 
58  return false;
59  }
60 };
61 
62 
63 
64 
65 //
66 // Quality test that checks kHCAL Severity
67 //
69 
70  public:
71 
72 
74 
75  }
76 
78  PFRecHitQTestBase(iConfig)
79  {
80  thresholds_ = iConfig.getParameter<std::vector<int> >("maxSeverities");
81  cleanThresholds_ = iConfig.getParameter<std::vector<double> >("cleaningThresholds");
82  std::vector<std::string> flags = iConfig.getParameter<std::vector<std::string> >("flags");
83  for (unsigned int i=0;i<flags.size();++i) {
84  if (flags[i] =="Standard") {
85  flags_.push_back(-1);
86  depths_.push_back(-1);
87 
88  }
89  else if (flags[i] =="HFInTime") {
90  flags_.push_back(1<<HcalCaloFlagLabels::HFInTimeWindow);
91  depths_.push_back(-1);
92  }
93  else if (flags[i] =="HFDigi") {
94  flags_.push_back(1<<HcalCaloFlagLabels::HFDigiTime);
95  depths_.push_back(-1);
96 
97  }
98  else if (flags[i] =="HFLong") {
99  flags_.push_back(1<<HcalCaloFlagLabels::HFLongShort);
100  depths_.push_back(1);
101 
102  }
103  else if (flags[i] =="HFShort") {
104  flags_.push_back(1<<HcalCaloFlagLabels::HFLongShort);
105  depths_.push_back(2);
106 
107  }
108  else {
109  flags_.push_back(-1);
110  depths_.push_back(-1);
111 
112  }
113  }
114 
115  }
116 
117  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
119  iSetup.get<HcalRecNumberingRecord>().get(topo);
120  theHcalTopology_ = topo.product();
121  edm::ESHandle<HcalChannelQuality> hcalChStatus;
122  iSetup.get<HcalChannelQualityRcd>().get( "withTopo", hcalChStatus );
123  theHcalChStatus_ = hcalChStatus.product();
124  edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl;
125  iSetup.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl);
126  hcalSevLvlComputer_ = hcalSevLvlComputerHndl.product();
127  }
128 
129  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
130  return true;
131  }
132  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
133  return test(rh.detid(),rh.energy(),rh.flags(),clean);
134  }
135 
136  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
137  return test(rh.detid(),rh.energy(),rh.flags(),clean);
138  }
139  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
140  return test(rh.detid(),rh.energy(),rh.flags(),clean);
141  }
142 
143  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
144  return true;
145  }
146 
147  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
148  return true;
149  }
150 
151  protected:
152  std::vector<int> thresholds_;
153  std::vector<double> cleanThresholds_;
154  std::vector<int> flags_;
155  std::vector<int> depths_;
159 
160  bool test(unsigned aDETID,double energy,int flags,bool& clean){
161  HcalDetId detid = (HcalDetId)aDETID;
162  if (theHcalTopology_->withSpecialRBXHBHE() && detid.subdet() == HcalEndcap){
163  detid = theHcalTopology_->idFront(detid);
164  }
165 
166  const HcalChannelStatus* theStatus = theHcalChStatus_->getValues(detid);
167  unsigned theStatusValue = theStatus->getValue();
168  // Now get severity of problems for the given detID, based on the rechit flag word and the channel quality status value
169  for (unsigned int i=0;i<thresholds_.size();++i) {
170  int hitSeverity =0;
171  if (energy < cleanThresholds_[i])
172  continue;
173 
174  if(flags_[i]<0) {
175  hitSeverity=hcalSevLvlComputer_->getSeverityLevel(detid, flags,theStatusValue);
176  }
177  else {
178  hitSeverity=hcalSevLvlComputer_->getSeverityLevel(detid, flags & flags_[i],theStatusValue);
179  }
180 
181  if (hitSeverity>thresholds_[i] && ((depths_[i]<0 || (depths_[i]==detid.depth())))) {
182  clean=true;
183  return false;
184  }
185  }
186  return true;
187  }
188 
189 };
190 
191 //
192 // Quality test that applies threshold and timing as a function of depth
193 //
195  public:
197 
198  }
199 
201  PFRecHitQTestBase(iConfig)
202  {
203  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
204  for (unsigned int i=0;i<psets.size();++i) {
205  depths_.push_back(psets[i].getParameter<int>("depth"));
206  minTimes_.push_back(psets[i].getParameter<double>("minTime"));
207  maxTimes_.push_back(psets[i].getParameter<double>("maxTime"));
208  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
209  }
210  }
211 
212  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
213  }
214 
215  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
216  return true;
217  }
218  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
219  return test(rh.detid(),rh.energy(),rh.time(),clean);
220  }
221 
222  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
223  return test(rh.detid(),rh.energy(),rh.time(),clean);
224  }
225  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean) {
226  return test(rh.detid(),rh.energy(),rh.time(),clean);
227  }
228 
229  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
230  return true;
231  }
232 
233  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
234  return true;
235  }
236 
237  protected:
238  std::vector<int> depths_;
239  std::vector<double> minTimes_;
240  std::vector<double> maxTimes_;
241  std::vector<double> thresholds_;
242 
243  bool test(unsigned aDETID,double energy,double time,bool& clean){
244  HcalDetId detid(aDETID);
245  for (unsigned int i=0;i<depths_.size();++i) {
246  if (detid.depth() == depths_[i]) {
247  if ((time <minTimes_[i] || time >maxTimes_[i] ) && energy>thresholds_[i])
248  {
249  clean=true;
250  return false;
251  }
252  break;
253  }
254  }
255  return true;
256  }
257 };
258 
259 
260 
261 
262 //
263 // Quality test that applies threshold as a function of depth
264 //
266  public:
268 
269  }
270 
272  PFRecHitQTestBase(iConfig)
273  {
274  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
275  for (unsigned int i=0;i<psets.size();++i) {
276  depths_.push_back(psets[i].getParameter<int>("depth"));
277  thresholds_.push_back(psets[i].getParameter<double>("threshold"));
278  }
279  }
280 
281  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
282  }
283 
284  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
285  return true;
286  }
287  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
288  return test(rh.detid(),rh.energy(),rh.time(),clean);
289  }
290 
291  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
292  return test(rh.detid(),rh.energy(),rh.time(),clean);
293  }
294  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
295  return test(rh.detid(),rh.energy(),rh.time(),clean);
296  }
297 
298  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
299  return true;
300  }
301 
302  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
303  return true;
304  }
305 
306  protected:
307  std::vector<int> depths_;
308  std::vector<double> thresholds_;
309 
310  bool test(unsigned aDETID,double energy,double time,bool& clean){
311  HcalDetId detid(aDETID);
312  for (unsigned int i=0;i<depths_.size();++i) {
313  if (detid.depth() == depths_[i]) {
314  if ( energy<thresholds_[i])
315  {
316  clean=false;
317  return false;
318  }
319  break;
320  }
321  }
322  return true;
323  }
324 };
325 
326 
327 
328 
329 
330 //
331 // Quality test that checks HO threshold applying different threshold in rings
332 //
334  public:
336 
337  }
338 
340  PFRecHitQTestBase(iConfig)
341  {
342  threshold0_ = iConfig.getParameter<double>("threshold_ring0");
343  threshold12_ = iConfig.getParameter<double>("threshold_ring12");
344  }
345 
346  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
347  }
348 
349  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
350  return true;
351  }
352  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
353  return true;
354  }
355 
356  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
357  return true;
358  }
359  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
360  HcalDetId detid(rh.detid());
361  if (abs(detid.ieta())<=4 && hit.energy()>threshold0_)
362  return true;
363  if (abs(detid.ieta())>4 && hit.energy()>threshold12_)
364  return true;
365 
366  return false;
367  }
368 
369  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
370  return true;
371  }
372 
373  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
374  return true;
375  }
376 
377  protected:
378  double threshold0_;
379  double threshold12_;
380 
381 };
382 
383 //
384 // Quality test that checks threshold as a function of ECAL eta-ring
385 //
391  public:
393 
394  }
395 
397  PFRecHitQTestBase(iConfig)
398  {
399  thresholds_ = iConfig.getParameter<std::vector<double> >("thresholds");
400  }
401 
402  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
404  iSetup.get<CaloGeometryRecord>().get(pG);
406  endcapGeometrySet_=false;
407  if (endcapGeometry) {
409  endcapGeometrySet_=true;
410  }
411  }
412 
413  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
414  return fullReadOut || pass(hit);
415  }
416  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
417  return true;
418  }
419 
420  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
421  return true;
422  }
423  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
424  return true;
425  }
426 
427  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
428  return true;
429  }
430 
431  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
432  return true;
433  }
434 
435  protected:
436  std::vector<double> thresholds_;
438 
439  bool pass(const reco::PFRecHit& hit){
440 
441  // this is to skip endcap ZS for Phase2 until there is a defined geometry
442  // apply the loosest ZS threshold, for the first eta-ring in EB
443  DetId detId(hit.detId());
444  if(!endcapGeometrySet_) {
445 
446  // there is only ECAL EB in Phase 2
447  if(detId.subdetId() != EcalBarrel) return true;
448 
449  // 0-169: EB eta-rings
450  // 170-208: EE- eta rings
451  // 209-247: EE+ eta rings
452  int firstEBRing = 0;
453  return (hit.energy() > thresholds_[firstEBRing]);
454  }
455 
456  int iring = EcalRingCalibrationTools::getRingIndex(detId);
457  if ( hit.energy() > thresholds_[iring] ) return true;
458 
459  return false;
460  }
461 };
462 
463 
464 //
465 // Quality test that checks ecal quality cuts
466 //
468  public:
470 
471  }
472 
474  PFRecHitQTestBase(iConfig)
475  {
476  thresholdCleaning_ = iConfig.getParameter<double>("cleaningThreshold");
477  timingCleaning_ = iConfig.getParameter<bool>("timingCleaning");
478  topologicalCleaning_ = iConfig.getParameter<bool>("topologicalCleaning");
479  skipTTRecoveredHits_ = iConfig.getParameter<bool>("skipTTRecoveredHits");
480 
481  }
482 
483  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
484  }
485 
486  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
487  if (skipTTRecoveredHits_ && rh.checkFlag(EcalRecHit::kTowerRecovered))
488  {
489  clean=true;
490  return false;
491  }
492  if ( timingCleaning_ && rh.energy() > thresholdCleaning_ &&
494  clean=true;
495  return false;
496  }
497 
498  if ( topologicalCleaning_ &&
499  ( rh.checkFlag(EcalRecHit::kWeird) ||
501  clean=true;
502  return false;
503  }
504 
505  return true;
506  }
507 
508  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
509  return true;
510  }
511 
512  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
513  return true;
514 
515  }
516 
517  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
518  return true;
519  }
520 
521  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
522  return true;
523 
524  }
525 
526  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
527  return true;
528  }
529 
530 
531  protected:
536 
537 };
538 
539 //
540 // Quality test that checks ES quality cuts
541 //
543 
544  public:
546 
547  }
548 
550  PFRecHitQTestBase(iConfig)
551  {
552  thresholdCleaning_ = iConfig.getParameter<double>("cleaningThreshold");
553  topologicalCleaning_ = iConfig.getParameter<bool>("topologicalCleaning");
554  }
555 
556  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
557  }
558 
559  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
560 
561  if ( rh.energy() < thresholdCleaning_ ) {
562  clean=false;
563  return false;
564  }
565 
566  if ( topologicalCleaning_ &&
575  )) {
576  clean=false;
577  return false;
578  }
579 
580  return true;
581  }
582 
583  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
584  return true;
585  }
586 
587  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
588  return true;
589 
590  }
591 
592  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
593  return true;
594  }
595 
596  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
597  return true;
598 
599  }
600 
601  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
602  return true;
603  }
604 
605 
606  protected:
609 
610 };
611 
612 //
613 // Quality test that calibrates tower 29 of HCAL
614 //
616  public:
618 
619  }
620 
622  PFRecHitQTestBase(iConfig)
623  {
624  calibFactor_ =iConfig.getParameter<double>("calibFactor");
625  }
626 
627  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
628  }
629 
630  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut){
631  return true;
632  }
633  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean){
634  HcalDetId detId(hit.detId());
635  if (abs(detId.ieta())==29)
636  hit.setEnergy(hit.energy()*calibFactor_);
637  return true;
638 
639  }
640 
641  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean){
642  return true;
643 
644  }
645  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean){
646  return true;
647  }
648 
649  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean){
650  CaloTowerDetId detId(hit.detId());
651  if (detId.ietaAbs()==29)
652  hit.setEnergy(hit.energy()*calibFactor_);
653  return true;
654 
655  }
656 
657  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean){
658  return true;
659  }
660 
661  protected:
663 };
664 
666  public:
668 
669  }
670 
672  PFRecHitQTestBase(iConfig)
673  {
674  recHitEnergy_keV_ = iConfig.getParameter<bool>("recHitEnergyIs_keV");
675  threshold_ = iConfig.getParameter<double>("thresholdInMIPs");
676  mip_ = iConfig.getParameter<double>("mipValueInkeV");
677  recHitEnergyMultiplier_ = iConfig.getParameter<double>("recHitEnergyMultiplier");
678  }
679 
680  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
681  }
682 
683  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut) {
684  throw cms::Exception("WrongDetector")
685  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
686  return false;
687  }
688  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean) {
689  throw cms::Exception("WrongDetector")
690  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
691  return false;
692  }
693 
694  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean) {
695  throw cms::Exception("WrongDetector")
696  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
697  return false;
698  }
699  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean) {
700  throw cms::Exception("WrongDetector")
701  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
702  return false;
703  }
704 
705  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean) {
706  throw cms::Exception("WrongDetector")
707  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
708  return false;
709  }
710 
711  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean) {
712  const double newE = ( recHitEnergy_keV_ ?
713  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
714  rh.energy()*recHitEnergyMultiplier_ );
715  hit.setEnergy(newE);
716  return pass(hit);
717  }
718 
719  protected:
721  double threshold_,mip_,recHitEnergyMultiplier_;
722 
723  bool pass(const reco::PFRecHit& hit) {
724  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
725  return hitValueInMIPs > threshold_;
726  }
727 };
728 
731  public:
733  geometryInstance_(""),
734  recHitEnergy_keV_(0.),
735  threshold_(0.),
736  mip_(0.),
737  recHitEnergyMultiplier_(0.) {
738  }
739 
741  PFRecHitQTestBase(iConfig),
742  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
743  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
744  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
745  mip_(iConfig.getParameter<double>("mipValueInkeV")),
746  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {
747  }
748 
749  void beginEvent(const edm::Event& event,const edm::EventSetup& iSetup) {
751  iSetup.get<IdealGeometryRecord>().get(geometryInstance_,geoHandle);
752  ddd_ = &(geoHandle->topology().dddConstants());
753  }
754 
755  bool test(reco::PFRecHit& hit,const EcalRecHit& rh,bool& clean,bool fullReadOut) {
756  throw cms::Exception("WrongDetector")
757  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
758  return false;
759  }
760  bool test(reco::PFRecHit& hit,const HBHERecHit& rh,bool& clean) {
761  throw cms::Exception("WrongDetector")
762  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
763  return false;
764  }
765 
766  bool test(reco::PFRecHit& hit,const HFRecHit& rh,bool& clean) {
767  throw cms::Exception("WrongDetector")
768  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
769  return false;
770  }
771  bool test(reco::PFRecHit& hit,const HORecHit& rh,bool& clean) {
772  throw cms::Exception("WrongDetector")
773  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
774  return false;
775  }
776 
777  bool test(reco::PFRecHit& hit,const CaloTower& rh,bool& clean) {
778  throw cms::Exception("WrongDetector")
779  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
780  return false;
781  }
782 
783  bool test(reco::PFRecHit& hit,const HGCRecHit& rh,bool& clean) {
784  const double newE = ( recHitEnergy_keV_ ?
785  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
786  rh.energy()*recHitEnergyMultiplier_ );
787  const int wafer = HGCalDetId(rh.detid()).wafer();
788  const float mult = (float) ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
789  hit.setEnergy(newE);
790  return pass(hit,mult);
791  }
792 
793  protected:
795  const bool recHitEnergy_keV_;
796  const double threshold_,mip_,recHitEnergyMultiplier_;
798 
799  bool pass(const reco::PFRecHit& hit, const float mult) {
800  const double hitValueInMIPs = 1e6*hit.energy()/(mult*mip_);
801  return hitValueInMIPs > threshold_;
802  }
803 };
804 
805 #endif
double thresholdCleaning_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
const HcalChannelQuality * theHcalChStatus_
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
static void setCaloGeometry(const CaloGeometry *geometry)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
std::vector< double > minTimes_
bool pass(const reco::PFRecHit &hit)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
const DetId & detid() const
Definition: CaloRecHit.h:21
unsigned detId() const
rechit detId
Definition: PFRecHit.h:108
PFRecHitQTestThreshold(const edm::ParameterSet &iConfig)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
std::vector< int > depths_
bool pass(const reco::PFRecHit &hit, const float mult)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
const HcalSeverityLevelComputer * hcalSevLvlComputer_
std::vector< double > maxTimes_
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestECAL(const edm::ParameterSet &iConfig)
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
float time() const
Definition: CaloRecHit.h:19
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
PFRecHitQTestHCALChannel(const edm::ParameterSet &iConfig)
std::vector< double > cleanThresholds_
std::vector< double > thresholds_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestHCALThresholdVsDepth(const edm::ParameterSet &iConfig)
const HcalTopology * theHcalTopology_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
std::vector< double > thresholds_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(unsigned aDETID, double energy, double time, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Definition: PFRecHit.h:31
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
bool checkFlag(int flag) const
check if the flag is true
Definition: EcalRecHit.h:189
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
float energy() const
Definition: CaloRecHit.h:17
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:96
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
PFRecHitQTestHCALCalib29(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
uint32_t flags() const
Definition: CaloRecHit.h:22
bool pass(const reco::PFRecHit &hit)
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
float energy() const
Definition: EcalRecHit.h:68
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
float energy() const
rechit energy
Definition: PFRecHit.h:114
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
PFRecHitQTestHCALTimeVsDepth(const edm::ParameterSet &iConfig)
std::vector< T * > clean
Definition: MVATrainer.cc:156
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
Definition: DetId.h:18
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
PFRecHitQTestHOThreshold(const edm::ParameterSet &iConfig)
const HGCalDDDConstants & dddConstants() const
bool test(reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
const T & get() const
Definition: EventSetup.h:56
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
PFRecHitQTestThresholdInThicknessNormalizedMIPs(const edm::ParameterSet &iConfig)
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
std::vector< int > depths_
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
std::vector< int > thresholds_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
void setEnergy(float energy)
Definition: PFRecHit.h:74
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
std::vector< double > thresholds_
PFRecHitQTestThresholdInMIPs(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
HcalDetId idFront(const HcalDetId &id) const
Definition: HcalTopology.h:170
bool test(unsigned aDETID, double energy, int flags, bool &clean)
bool test(reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
uint32_t getValue() const
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
bool withSpecialRBXHBHE() const
Definition: HcalTopology.h:162
PFRecHitQTestECALMultiThreshold(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool pass(const reco::PFRecHit &hit)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
void beginEvent(const edm::Event &event, const edm::EventSetup &iSetup)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
T const * product() const
Definition: ESHandle.h:86
std::vector< int > flags_
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
Definition: event.py:1
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
PFRecHitQTestES(const edm::ParameterSet &iConfig)
bool test(reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
bool test(reco::PFRecHit &hit, const HORecHit &rh, bool &clean)