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

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 660 of file PFRecHitQTests.h.

660  :
661  recHitEnergy_keV_(false),
662  threshold_(0.),
663  mip_(0.),
665  {
666  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 668 of file PFRecHitQTests.h.

668  :
669  PFRecHitQTestBase(iConfig),
670  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
671  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
672  mip_(iConfig.getParameter<double>("mipValueInkeV")),
673  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier"))
674  {
675  }
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 677 of file PFRecHitQTests.h.

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

Definition at line 720 of file PFRecHitQTests.h.

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

720  {
721  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
722  return hitValueInMIPs > threshold_;
723  }
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 680 of file PFRecHitQTests.h.

References Exception.

680  {
681  throw cms::Exception("WrongDetector")
682  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
683  return false;
684  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 685 of file PFRecHitQTests.h.

References Exception.

685  {
686  throw cms::Exception("WrongDetector")
687  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
688  return false;
689  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 691 of file PFRecHitQTests.h.

References Exception.

691  {
692  throw cms::Exception("WrongDetector")
693  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
694  return false;
695  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 696 of file PFRecHitQTests.h.

References Exception.

696  {
697  throw cms::Exception("WrongDetector")
698  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
699  return false;
700  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 702 of file PFRecHitQTests.h.

References Exception.

702  {
703  throw cms::Exception("WrongDetector")
704  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
705  return false;
706  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 708 of file PFRecHitQTests.h.

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

708  {
709  const double newE = ( recHitEnergy_keV_ ?
710  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
712  hit.setEnergy(newE);
713  return pass(hit);
714  }
float energy() const
Definition: CaloRecHit.h:17
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 718 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 717 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 718 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 718 of file PFRecHitQTests.h.