CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 577 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( )
inline

Definition at line 579 of file PFRecHitQTests.h.

579  {
580 
581  }
PFRecHitQTestThresholdInMIPs::PFRecHitQTestThresholdInMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 583 of file PFRecHitQTests.h.

References edm::ParameterSet::getParameter(), mip_, recHitEnergy_keV_, recHitEnergyMultiplier_, and threshold_.

583  :
584  PFRecHitQTestBase(iConfig)
585  {
586  recHitEnergy_keV_ = iConfig.getParameter<bool>("recHitEnergyIs_keV");
587  threshold_ = iConfig.getParameter<double>("thresholdInMIPs");
588  mip_ = iConfig.getParameter<double>("mipValueInkeV");
589  recHitEnergyMultiplier_ = iConfig.getParameter<double>("recHitEnergyMultiplier");
590  }
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 592 of file PFRecHitQTests.h.

592  {
593  }
bool PFRecHitQTestThresholdInMIPs::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 635 of file PFRecHitQTests.h.

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

Referenced by test().

635  {
636  const double hitValueInMIPs = 1e6*hit.energy()/mip_;
637  return hitValueInMIPs > threshold_;
638  }
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 595 of file PFRecHitQTests.h.

References Exception.

595  {
596  throw cms::Exception("WrongDetector")
597  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
598  return false;
599  }
bool PFRecHitQTestThresholdInMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 600 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 606 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 611 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 617 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 623 of file PFRecHitQTests.h.

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

623  {
624  const double newE = ( recHitEnergy_keV_ ?
625  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
627  hit.setEnergy(newE);
628  return pass(hit);
629  }
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 633 of file PFRecHitQTests.h.

Referenced by pass(), and PFRecHitQTestThresholdInMIPs().

bool PFRecHitQTestThresholdInMIPs::recHitEnergy_keV_
protected

Definition at line 632 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestThresholdInMIPs(), and test().

double PFRecHitQTestThresholdInMIPs::recHitEnergyMultiplier_
protected

Definition at line 633 of file PFRecHitQTests.h.

Referenced by PFRecHitQTestThresholdInMIPs(), and test().

double PFRecHitQTestThresholdInMIPs::threshold_
protected

Definition at line 633 of file PFRecHitQTests.h.

Referenced by pass(), and PFRecHitQTestThresholdInMIPs().