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

653  : PFRecHitQTestBase(iConfig, cc),
654  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
655  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
656  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
657  mip_(iConfig.getParameter<double>("mipValueInkeV")),
658  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")),
659  geomToken_(cc.esConsumes()) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
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 661 of file PFRecHitQTests.h.

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

661  {
663  ddd_ = &(geoHandle->topology().dddConstants());
664  }
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
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 704 of file PFRecHitQTests.h.

References mip_, PixelBaryCentreAnalyzer_cfg::mult, and threshold_.

Referenced by test().

704  {
705  const double hitValueInMIPs = 1e6 * hit.energy() / (mult * mip_);
706  return hitValueInMIPs > threshold_;
707  }

◆ test() [1/6]

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

Implements PFRecHitQTestBase.

Definition at line 666 of file PFRecHitQTests.h.

References Exception.

666  {
667  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
668  return false;
669  }

◆ test() [2/6]

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

Implements PFRecHitQTestBase.

Definition at line 670 of file PFRecHitQTests.h.

References Exception.

670  {
671  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
672  return false;
673  }

◆ test() [3/6]

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

Implements PFRecHitQTestBase.

Definition at line 675 of file PFRecHitQTests.h.

References Exception.

675  {
676  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
677  return false;
678  }

◆ test() [4/6]

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

Implements PFRecHitQTestBase.

Definition at line 679 of file PFRecHitQTests.h.

References Exception.

679  {
680  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
681  return false;
682  }

◆ test() [5/6]

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

Implements PFRecHitQTestBase.

Definition at line 684 of file PFRecHitQTests.h.

References Exception.

684  {
685  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
686  return false;
687  }

◆ test() [6/6]

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

Implements PFRecHitQTestBase.

Definition at line 689 of file PFRecHitQTests.h.

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

689  {
690  const double newE =
692  const int wafer = HGCalDetId(rh.detid()).wafer();
693  const float mult = (float)ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
694  hit.setEnergy(newE);
695  return pass(hit, mult);
696  }
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 702 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

◆ geometryInstance_

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 699 of file PFRecHitQTests.h.

◆ geomToken_

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

Definition at line 710 of file PFRecHitQTests.h.

Referenced by beginEvent().

◆ mip_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 701 of file PFRecHitQTests.h.

Referenced by pass().

◆ recHitEnergy_keV_

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 700 of file PFRecHitQTests.h.

Referenced by test().

◆ recHitEnergyMultiplier_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 701 of file PFRecHitQTests.h.

Referenced by test().

◆ threshold_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 701 of file PFRecHitQTests.h.

Referenced by pass().