CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private 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, edm::ConsumesCollector &cc)
 
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, edm::ConsumesCollector &cc)
 
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_
 

Private Attributes

edm::ESGetToken< HGCalGeometry, IdealGeometryRecordgeomToken_
 

Detailed Description

Definition at line 625 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestThresholdInThicknessNormalizedMIPs() [1/2]

PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( )
inline

◆ PFRecHitQTestThresholdInThicknessNormalizedMIPs() [2/2]

PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( const edm::ParameterSet iConfig,
edm::ConsumesCollector cc 
)
inline

Definition at line 630 of file PFRecHitQTests.h.

631  : PFRecHitQTestBase(iConfig, cc),
632  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
633  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
634  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
635  mip_(iConfig.getParameter<double>("mipValueInkeV")),
636  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")),
637  geomToken_(cc.esConsumes()) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFRecHitQTestBase()=default
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 639 of file PFRecHitQTests.h.

References ddd_, HGCalTopology::dddConstants(), geomToken_, edm::EventSetup::getHandle(), and HGCalGeometry::topology().

639  {
641  ddd_ = &(geoHandle->topology().dddConstants());
642  }
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
const HGCalTopology & topology() const
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98

◆ pass()

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass ( const reco::PFRecHit hit,
const float  mult 
)
inlineprotected

Definition at line 682 of file PFRecHitQTests.h.

References mip_, VarParsing::mult, and threshold_.

Referenced by test().

682  {
683  const double hitValueInMIPs = 1e6 * hit.energy() / (mult * mip_);
684  return hitValueInMIPs > threshold_;
685  }

◆ test() [1/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
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  }

◆ test() [2/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 648 of file PFRecHitQTests.h.

References Exception.

648  {
649  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
650  return false;
651  }

◆ test() [3/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 653 of file PFRecHitQTests.h.

References Exception.

653  {
654  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
655  return false;
656  }

◆ test() [4/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 657 of file PFRecHitQTests.h.

References Exception.

657  {
658  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
659  return false;
660  }

◆ test() [5/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 662 of file PFRecHitQTests.h.

References Exception.

662  {
663  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
664  return false;
665  }

◆ test() [6/6]

bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 667 of file PFRecHitQTests.h.

References ddd_, CaloRecHit::detid(), CaloRecHit::energy(), dqmMemoryStats::float, VarParsing::mult, pass(), recHitEnergy_keV_, recHitEnergyMultiplier_, and HGCalDDDConstants::waferTypeL().

667  {
668  const double newE =
670  const int wafer = HGCalDetId(rh.detid()).wafer();
671  const float mult = (float)ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
672  hit.setEnergy(newE);
673  return pass(hit, mult);
674  }
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool pass(const reco::PFRecHit &hit, const float mult)
constexpr float energy() const
Definition: CaloRecHit.h:29
int waferTypeL(int wafer) const

Member Data Documentation

◆ ddd_

const HGCalDDDConstants* PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
protected

Definition at line 680 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

◆ geometryInstance_

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 677 of file PFRecHitQTests.h.

◆ geomToken_

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> PFRecHitQTestThresholdInThicknessNormalizedMIPs::geomToken_
private

Definition at line 688 of file PFRecHitQTests.h.

Referenced by beginEvent().

◆ mip_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 679 of file PFRecHitQTests.h.

Referenced by pass().

◆ recHitEnergy_keV_

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 678 of file PFRecHitQTests.h.

Referenced by test().

◆ recHitEnergyMultiplier_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 679 of file PFRecHitQTests.h.

Referenced by test().

◆ threshold_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 679 of file PFRecHitQTests.h.

Referenced by pass().