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 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, 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 593 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestThresholdInMIPs() [1/2]

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 595 of file PFRecHitQTests.h.

◆ PFRecHitQTestThresholdInMIPs() [2/2]

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

Definition at line 597 of file PFRecHitQTests.h.

598  : PFRecHitQTestBase(iConfig, cc),
599  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
600  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
601  mip_(iConfig.getParameter<double>("mipValueInkeV")),
602  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
PFRecHitQTestBase()=default

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 604 of file PFRecHitQTests.h.

604 {}

◆ pass()

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

Definition at line 640 of file PFRecHitQTests.h.

References mip_, and threshold_.

Referenced by test().

640  {
641  const double hitValueInMIPs = 1e6 * hit.energy() / mip_;
642  return hitValueInMIPs > threshold_;
643  }

◆ test() [1/6]

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

Implements PFRecHitQTestBase.

Definition at line 606 of file PFRecHitQTests.h.

References Exception.

606  {
607  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
608  return false;
609  }

◆ test() [2/6]

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

Implements PFRecHitQTestBase.

Definition at line 610 of file PFRecHitQTests.h.

References Exception.

610  {
611  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
612  return false;
613  }

◆ test() [3/6]

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

Implements PFRecHitQTestBase.

Definition at line 615 of file PFRecHitQTests.h.

References Exception.

615  {
616  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
617  return false;
618  }

◆ test() [4/6]

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

Implements PFRecHitQTestBase.

Definition at line 619 of file PFRecHitQTests.h.

References Exception.

619  {
620  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
621  return false;
622  }

◆ test() [5/6]

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

Implements PFRecHitQTestBase.

Definition at line 624 of file PFRecHitQTests.h.

References Exception.

624  {
625  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
626  return false;
627  }

◆ test() [6/6]

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

Implements PFRecHitQTestBase.

Definition at line 629 of file PFRecHitQTests.h.

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

629  {
630  const double newE =
632  hit.setEnergy(newE);
633  return pass(hit);
634  }
constexpr float energy() const
Definition: CaloRecHit.h:29
bool pass(const reco::PFRecHit &hit)

Member Data Documentation

◆ mip_

const double PFRecHitQTestThresholdInMIPs::mip_
protected

Definition at line 638 of file PFRecHitQTests.h.

Referenced by pass().

◆ recHitEnergy_keV_

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 637 of file PFRecHitQTests.h.

Referenced by test().

◆ recHitEnergyMultiplier_

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 638 of file PFRecHitQTests.h.

Referenced by test().

◆ threshold_

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 638 of file PFRecHitQTests.h.

Referenced by pass().