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)
 
 PFRecHitQTestThresholdInMIPs ()
 
 PFRecHitQTestThresholdInMIPs (const edm::ParameterSet &iConfig)
 
bool test (reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
 
bool test (reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()
 
 PFRecHitQTestBase (const edm::ParameterSet &iConfig)
 
virtual ~PFRecHitQTestBase ()=default
 

Protected Member Functions

bool pass (const reco::PFRecHit &hit)
 

Protected Attributes

double mip_
 
bool recHitEnergy_keV_
 
double recHitEnergyMultiplier_
 
double threshold_
 

Detailed Description

Definition at line 665 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 667 of file PFRecHitQTests.h.

667  {
668 
669  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 671 of file PFRecHitQTests.h.

References edm::ParameterSet::getParameter(), and PFRecHitQTestThreshold::threshold_.

671  :
672  PFRecHitQTestBase(iConfig)
673  {
674  recHitEnergy_keV_ = iConfig.getParameter<bool>("recHitEnergyIs_keV");
675  threshold_ = iConfig.getParameter<double>("thresholdInMIPs");
676  mip_ = iConfig.getParameter<double>("mipValueInkeV");
677  recHitEnergyMultiplier_ = iConfig.getParameter<double>("recHitEnergyMultiplier");
678  }
T getParameter(std::string const &) const

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 680 of file PFRecHitQTests.h.

680  {
681  }
bool PFRecHitQTestThresholdInMIPs::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 723 of file PFRecHitQTests.h.

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

723  {
724  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
725  return hitValueInMIPs > threshold_;
726  }
float energy() const
rechit energy
Definition: PFRecHit.h:114
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 683 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 688 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 694 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 699 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 705 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 711 of file PFRecHitQTests.h.

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

711  {
712  const double newE = ( recHitEnergy_keV_ ?
713  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
715  hit.setEnergy(newE);
716  return pass(hit);
717  }
float energy() const
Definition: CaloRecHit.h:17
bool pass(const reco::PFRecHit &hit)
void setEnergy(float energy)
Definition: PFRecHit.h:74

Member Data Documentation

double PFRecHitQTestThresholdInMIPs::mip_
protected

Definition at line 721 of file PFRecHitQTests.h.

bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 720 of file PFRecHitQTests.h.

double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 721 of file PFRecHitQTests.h.

double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 721 of file PFRecHitQTests.h.