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

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 653 of file PFRecHitQTests.h.

653  :
654  recHitEnergy_keV_(false),
655  threshold_(0.),
656  mip_(0.),
658  {
659  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 661 of file PFRecHitQTests.h.

661  :
662  PFRecHitQTestBase(iConfig),
663  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
664  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
665  mip_(iConfig.getParameter<double>("mipValueInkeV")),
666  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier"))
667  {
668  }
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 670 of file PFRecHitQTests.h.

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

Definition at line 713 of file PFRecHitQTests.h.

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

713  {
714  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
715  return hitValueInMIPs > threshold_;
716  }
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 673 of file PFRecHitQTests.h.

References Exception.

673  {
674  throw cms::Exception("WrongDetector")
675  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
676  return false;
677  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 678 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 684 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 689 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 695 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 701 of file PFRecHitQTests.h.

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

701  {
702  const double newE = ( recHitEnergy_keV_ ?
703  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
705  hit.setEnergy(newE);
706  return pass(hit);
707  }
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 711 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 710 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 711 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 711 of file PFRecHitQTests.h.