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, edm::ConsumesCollector &cc)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean) override
 
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 HGCRecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean) override
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()=default
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig, edm::ConsumesCollector &cc)
 
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 567 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestThresholdInMIPs() [1/2]

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 569 of file PFRecHitQTests.h.

569 : recHitEnergy_keV_(false), threshold_(0.), mip_(0.), recHitEnergyMultiplier_(0.) {}

◆ PFRecHitQTestThresholdInMIPs() [2/2]

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig,
edm::ConsumesCollector cc 
)
inline

Definition at line 571 of file PFRecHitQTests.h.

572  : PFRecHitQTestBase(iConfig, cc),
573  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
574  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
575  mip_(iConfig.getParameter<double>("mipValueInkeV")),
576  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {}

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 578 of file PFRecHitQTests.h.

578 {}

◆ pass()

bool PFRecHitQTestThresholdInMIPs::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 614 of file PFRecHitQTests.h.

614  {
615  const double hitValueInMIPs = 1e6 * hit.energy() / mip_;
616  return hitValueInMIPs > threshold_;
617  }

References mip_, and threshold_.

Referenced by test().

◆ test() [1/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 598 of file PFRecHitQTests.h.

598  {
599  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
600  return false;
601  }

References Exception.

◆ test() [2/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 580 of file PFRecHitQTests.h.

580  {
581  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
582  return false;
583  }

References Exception.

◆ test() [3/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 584 of file PFRecHitQTests.h.

584  {
585  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
586  return false;
587  }

References Exception.

◆ test() [4/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 589 of file PFRecHitQTests.h.

589  {
590  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
591  return false;
592  }

References Exception.

◆ test() [5/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 603 of file PFRecHitQTests.h.

603  {
604  const double newE =
606  hit.setEnergy(newE);
607  return pass(hit);
608  }

References CaloRecHit::energy(), pass(), recHitEnergy_keV_, and recHitEnergyMultiplier_.

◆ test() [6/6]

bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 593 of file PFRecHitQTests.h.

593  {
594  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
595  return false;
596  }

References Exception.

Member Data Documentation

◆ mip_

const double PFRecHitQTestThresholdInMIPs::mip_
protected

Definition at line 612 of file PFRecHitQTests.h.

Referenced by pass().

◆ recHitEnergy_keV_

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 611 of file PFRecHitQTests.h.

Referenced by test().

◆ recHitEnergyMultiplier_

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 612 of file PFRecHitQTests.h.

Referenced by test().

◆ threshold_

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 612 of file PFRecHitQTests.h.

Referenced by pass().

CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
PFRecHitQTestThresholdInMIPs::threshold_
const double threshold_
Definition: PFRecHitQTests.h:612
PFRecHitQTestBase::PFRecHitQTestBase
PFRecHitQTestBase()=default
cc
PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
const bool recHitEnergy_keV_
Definition: PFRecHitQTests.h:611
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
const double recHitEnergyMultiplier_
Definition: PFRecHitQTests.h:612
PFRecHitQTestThresholdInMIPs::pass
bool pass(const reco::PFRecHit &hit)
Definition: PFRecHitQTests.h:614
hit
Definition: SiStripHitEffFromCalibTree.cc:88
PFRecHitQTestThresholdInMIPs::mip_
const double mip_
Definition: PFRecHitQTests.h:612