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 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)
 

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

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 586 of file PFRecHitQTests.h.

586  {
587 
588  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 590 of file PFRecHitQTests.h.

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

590  :
591  PFRecHitQTestBase(iConfig)
592  {
593  recHitEnergy_keV_ = iConfig.getParameter<bool>("recHitEnergyIs_keV");
594  threshold_ = iConfig.getParameter<double>("thresholdInMIPs");
595  mip_ = iConfig.getParameter<double>("mipValueInkeV");
596  recHitEnergyMultiplier_ = iConfig.getParameter<double>("recHitEnergyMultiplier");
597  }
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 599 of file PFRecHitQTests.h.

599  {
600  }
bool PFRecHitQTestThresholdInMIPs::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 642 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 602 of file PFRecHitQTests.h.

References Exception.

602  {
603  throw cms::Exception("WrongDetector")
604  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
605  return false;
606  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 607 of file PFRecHitQTests.h.

References Exception.

607  {
608  throw cms::Exception("WrongDetector")
609  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
610  return false;
611  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 613 of file PFRecHitQTests.h.

References Exception.

613  {
614  throw cms::Exception("WrongDetector")
615  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
616  return false;
617  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 618 of file PFRecHitQTests.h.

References Exception.

618  {
619  throw cms::Exception("WrongDetector")
620  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
621  return false;
622  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 624 of file PFRecHitQTests.h.

References Exception.

624  {
625  throw cms::Exception("WrongDetector")
626  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
627  return false;
628  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 630 of file PFRecHitQTests.h.

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

630  {
631  const double newE = ( recHitEnergy_keV_ ?
632  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
634  hit.setEnergy(newE);
635  return pass(hit);
636  }
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 640 of file PFRecHitQTests.h.

bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 639 of file PFRecHitQTests.h.

double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 640 of file PFRecHitQTests.h.

double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 640 of file PFRecHitQTests.h.