CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
PFRecHitQTestECALMultiThreshold Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestECALMultiThreshold:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup)
 
 PFRecHitQTestECALMultiThreshold ()
 
 PFRecHitQTestECALMultiThreshold (const edm::ParameterSet &iConfig)
 
bool test (reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
 
bool test (reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig)
 
virtual ~PFRecHitQTestBase ()=default
 

Protected Member Functions

bool pass (const reco::PFRecHit &hit)
 

Protected Attributes

bool endcapGeometrySet_
 
std::vector< double > thresholds_
 

Detailed Description

Definition at line 390 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( )
inline

Definition at line 392 of file PFRecHitQTests.h.

392  {
393 
394  }
PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( const edm::ParameterSet iConfig)
inline

Definition at line 396 of file PFRecHitQTests.h.

References edm::ParameterSet::getParameter().

396  :
397  PFRecHitQTestBase(iConfig)
398  {
399  thresholds_ = iConfig.getParameter<std::vector<double> >("thresholds");
400  }
T getParameter(std::string const &) const
std::vector< double > thresholds_

Member Function Documentation

void PFRecHitQTestECALMultiThreshold::beginEvent ( const edm::Event event,
const edm::EventSetup iSetup 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 402 of file PFRecHitQTests.h.

References DetId::Ecal, EcalEndcap, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), and EcalRingCalibrationTools::setCaloGeometry().

402  {
404  iSetup.get<CaloGeometryRecord>().get(pG);
406  endcapGeometrySet_=false;
407  if (endcapGeometry) {
409  endcapGeometrySet_=true;
410  }
411  }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
static void setCaloGeometry(const CaloGeometry *geometry)
const T & get() const
Definition: EventSetup.h:56
bool PFRecHitQTestECALMultiThreshold::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 439 of file PFRecHitQTests.h.

References reco::PFRecHit::detId(), EcalBarrel, reco::PFRecHit::energy(), and EcalRingCalibrationTools::getRingIndex().

439  {
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  }
unsigned detId() const
rechit detId
Definition: PFRecHit.h:108
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
float energy() const
rechit energy
Definition: PFRecHit.h:114
Definition: DetId.h:18
std::vector< double > thresholds_
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 413 of file PFRecHitQTests.h.

References PFRecHitQTestThreshold::pass().

413  {
414  return fullReadOut || pass(hit);
415  }
bool pass(const reco::PFRecHit &hit)
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 416 of file PFRecHitQTests.h.

416  {
417  return true;
418  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 420 of file PFRecHitQTests.h.

420  {
421  return true;
422  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 423 of file PFRecHitQTests.h.

423  {
424  return true;
425  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 427 of file PFRecHitQTests.h.

427  {
428  return true;
429  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 431 of file PFRecHitQTests.h.

431  {
432  return true;
433  }

Member Data Documentation

bool PFRecHitQTestECALMultiThreshold::endcapGeometrySet_
protected

Definition at line 437 of file PFRecHitQTests.h.

std::vector<double> PFRecHitQTestECALMultiThreshold::thresholds_
protected

Definition at line 436 of file PFRecHitQTests.h.