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

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 729 of file PFRecHitQTests.h.

729  :
730  recHitEnergy_keV_(false),
731  threshold_(0.),
732  mip_(0.),
734  {
735  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 737 of file PFRecHitQTests.h.

737  :
738  PFRecHitQTestBase(iConfig),
739  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
740  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
741  mip_(iConfig.getParameter<double>("mipValueInkeV")),
742  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier"))
743  {
744  }
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 746 of file PFRecHitQTests.h.

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

Definition at line 789 of file PFRecHitQTests.h.

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

789  {
790  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
791  return hitValueInMIPs > threshold_;
792  }
float energy() const
rechit energy
Definition: PFRecHit.h:114
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 749 of file PFRecHitQTests.h.

References Exception.

749  {
750  throw cms::Exception("WrongDetector")
751  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
752  return false;
753  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 754 of file PFRecHitQTests.h.

References Exception.

754  {
755  throw cms::Exception("WrongDetector")
756  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
757  return false;
758  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 760 of file PFRecHitQTests.h.

References Exception.

760  {
761  throw cms::Exception("WrongDetector")
762  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
763  return false;
764  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 765 of file PFRecHitQTests.h.

References Exception.

765  {
766  throw cms::Exception("WrongDetector")
767  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
768  return false;
769  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 771 of file PFRecHitQTests.h.

References Exception.

771  {
772  throw cms::Exception("WrongDetector")
773  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
774  return false;
775  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 777 of file PFRecHitQTests.h.

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

777  {
778  const double newE = ( recHitEnergy_keV_ ?
779  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
781  hit.setEnergy(newE);
782  return pass(hit);
783  }
constexpr float energy() const
Definition: CaloRecHit.h:31
bool pass(const reco::PFRecHit &hit)
void setEnergy(float energy)
Definition: PFRecHit.h:74

Member Data Documentation

const double PFRecHitQTestThresholdInMIPs::mip_
protected

Definition at line 787 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 786 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 787 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 787 of file PFRecHitQTests.h.