CMS 3D CMS Logo

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

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestThresholdInMIPs:
PFRecHitQTestBase

Public Member Functions

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

Protected Member Functions

bool pass (const reco::PFRecHit &hit)
 

Protected Attributes

const double mip_
 
const bool recHitEnergy_keV_
 
const double recHitEnergyMultiplier_
 
const double threshold_
 

Detailed Description

Definition at line 552 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 554 of file PFRecHitQTests.h.

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 556 of file PFRecHitQTests.h.

557  : PFRecHitQTestBase(iConfig),
558  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
559  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
560  mip_(iConfig.getParameter<double>("mipValueInkeV")),
561  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {}
T getParameter(std::string const &) const
PFRecHitQTestBase()=default

Member Function Documentation

void PFRecHitQTestThresholdInMIPs::beginEvent ( const edm::Event event,
const edm::EventSetup iSetup 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 563 of file PFRecHitQTests.h.

563 {}
bool PFRecHitQTestThresholdInMIPs::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 599 of file PFRecHitQTests.h.

References reco::PFRecHit::energy(), and PFRecHitQTestThreshold::threshold_.

599  {
600  const double hitValueInMIPs = 1e6 * hit.energy() / mip_;
601  return hitValueInMIPs > threshold_;
602  }
float energy() const
rechit energy
Definition: PFRecHit.h:99
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 565 of file PFRecHitQTests.h.

References Exception.

565  {
566  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
567  return false;
568  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 569 of file PFRecHitQTests.h.

References Exception.

569  {
570  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
571  return false;
572  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 574 of file PFRecHitQTests.h.

References Exception.

574  {
575  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
576  return false;
577  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 578 of file PFRecHitQTests.h.

References Exception.

578  {
579  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
580  return false;
581  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 583 of file PFRecHitQTests.h.

References Exception.

583  {
584  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
585  return false;
586  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 588 of file PFRecHitQTests.h.

References CaloRecHit::energy(), PFRecHitQTestThreshold::pass(), and reco::PFRecHit::setEnergy().

588  {
589  const double newE =
591  hit.setEnergy(newE);
592  return pass(hit);
593  }
constexpr float energy() const
Definition: CaloRecHit.h:31
bool pass(const reco::PFRecHit &hit)
void setEnergy(float energy)
Definition: PFRecHit.h:69

Member Data Documentation

const double PFRecHitQTestThresholdInMIPs::mip_
protected

Definition at line 597 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 596 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 597 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 597 of file PFRecHitQTests.h.