CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
PFRecHitQTestThresholdInThicknessNormalizedMIPs Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestThresholdInThicknessNormalizedMIPs:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup) override
 
 PFRecHitQTestThresholdInThicknessNormalizedMIPs ()
 
 PFRecHitQTestThresholdInThicknessNormalizedMIPs (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, const float mult)
 

Protected Attributes

const HGCalDDDConstantsddd_
 
const std::string geometryInstance_
 
const double mip_
 
const bool recHitEnergy_keV_
 
const double recHitEnergyMultiplier_
 
const double threshold_
 

Detailed Description

Definition at line 612 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( )
inline
PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( const edm::ParameterSet iConfig)
inline

Definition at line 617 of file PFRecHitQTests.h.

618  : PFRecHitQTestBase(iConfig),
619  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
620  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
621  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
622  mip_(iConfig.getParameter<double>("mipValueInkeV")),
623  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {}
T getParameter(std::string const &) const
PFRecHitQTestBase()=default

Member Function Documentation

void PFRecHitQTestThresholdInThicknessNormalizedMIPs::beginEvent ( const edm::Event event,
const edm::EventSetup iSetup 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 625 of file PFRecHitQTests.h.

References HGCalTopology::dddConstants(), edm::EventSetup::get(), and HGCalGeometry::topology().

625  {
627  iSetup.get<IdealGeometryRecord>().get(geometryInstance_, geoHandle);
628  ddd_ = &(geoHandle->topology().dddConstants());
629  }
const HGCalTopology & topology() const
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:96
T get() const
Definition: EventSetup.h:73
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass ( const reco::PFRecHit hit,
const float  mult 
)
inlineprotected

Definition at line 669 of file PFRecHitQTests.h.

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

669  {
670  const double hitValueInMIPs = 1e6 * hit.energy() / (mult * mip_);
671  return hitValueInMIPs > threshold_;
672  }
float energy() const
rechit energy
Definition: PFRecHit.h:95
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 631 of file PFRecHitQTests.h.

References Exception.

631  {
632  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
633  return false;
634  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 635 of file PFRecHitQTests.h.

References Exception.

635  {
636  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
637  return false;
638  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 640 of file PFRecHitQTests.h.

References Exception.

640  {
641  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
642  return false;
643  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 644 of file PFRecHitQTests.h.

References Exception.

644  {
645  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
646  return false;
647  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 649 of file PFRecHitQTests.h.

References Exception.

649  {
650  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
651  return false;
652  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 654 of file PFRecHitQTests.h.

References CaloRecHit::detid(), CaloRecHit::energy(), dqmMemoryStats::float, VarParsing::mult, PFRecHitQTestThreshold::pass(), and reco::PFRecHit::setEnergy().

654  {
655  const double newE =
657  const int wafer = HGCalDetId(rh.detid()).wafer();
658  const float mult = (float)ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
659  hit.setEnergy(newE);
660  return pass(hit, mult);
661  }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool pass(const reco::PFRecHit &hit, const float mult)
int waferTypeL(int wafer) const
void setEnergy(float energy)
Definition: PFRecHit.h:65

Member Data Documentation

const HGCalDDDConstants* PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
protected

Definition at line 667 of file PFRecHitQTests.h.

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 664 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 666 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 665 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 666 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 666 of file PFRecHitQTests.h.