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 CaloTower &rh, bool &clean) override
 
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 HGCRecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HORecHit &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 621 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestThresholdInThicknessNormalizedMIPs() [1/2]

PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( )
inline

Definition at line 623 of file PFRecHitQTests.h.

◆ PFRecHitQTestThresholdInThicknessNormalizedMIPs() [2/2]

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

Definition at line 626 of file PFRecHitQTests.h.

627  : PFRecHitQTestBase(iConfig, cc),
628  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
629  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
630  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
631  mip_(iConfig.getParameter<double>("mipValueInkeV")),
632  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")),
633  geomToken_(cc.esConsumes()) {}

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 635 of file PFRecHitQTests.h.

635  {
637  ddd_ = &(geoHandle->topology().dddConstants());
638  }

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

◆ pass()

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

Definition at line 678 of file PFRecHitQTests.h.

678  {
679  const double hitValueInMIPs = 1e6 * hit.energy() / (mult * mip_);
680  return hitValueInMIPs > threshold_;
681  }

References mip_, VarParsing::mult, and threshold_.

Referenced by test().

◆ test() [1/6]

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

Implements PFRecHitQTestBase.

Definition at line 658 of file PFRecHitQTests.h.

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

References Exception.

◆ test() [2/6]

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

Implements PFRecHitQTestBase.

Definition at line 640 of file PFRecHitQTests.h.

640  {
641  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
642  return false;
643  }

References Exception.

◆ test() [3/6]

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

Implements PFRecHitQTestBase.

Definition at line 644 of file PFRecHitQTests.h.

644  {
645  throw cms::Exception("WrongDetector") << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
646  return false;
647  }

References Exception.

◆ test() [4/6]

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

Implements PFRecHitQTestBase.

Definition at line 649 of file PFRecHitQTests.h.

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

References Exception.

◆ test() [5/6]

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

Implements PFRecHitQTestBase.

Definition at line 663 of file PFRecHitQTests.h.

663  {
664  const double newE =
666  const int wafer = HGCalDetId(rh.detid()).wafer();
667  const float mult = (float)ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
668  hit.setEnergy(newE);
669  return pass(hit, mult);
670  }

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

◆ test() [6/6]

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

Implements PFRecHitQTestBase.

Definition at line 653 of file PFRecHitQTests.h.

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

References Exception.

Member Data Documentation

◆ ddd_

const HGCalDDDConstants* PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
protected

Definition at line 676 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

◆ geometryInstance_

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 673 of file PFRecHitQTests.h.

◆ geomToken_

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

Definition at line 684 of file PFRecHitQTests.h.

Referenced by beginEvent().

◆ mip_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by pass().

◆ recHitEnergy_keV_

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 674 of file PFRecHitQTests.h.

Referenced by test().

◆ recHitEnergyMultiplier_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by test().

◆ threshold_

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by pass().

PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
const HGCalDDDConstants * ddd_
Definition: PFRecHitQTests.h:676
PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
const double mip_
Definition: PFRecHitQTests.h:675
HGCalTopology::dddConstants
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
const double threshold_
Definition: PFRecHitQTests.h:675
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass
bool pass(const reco::PFRecHit &hit, const float mult)
Definition: PFRecHitQTests.h:678
PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
const std::string geometryInstance_
Definition: PFRecHitQTests.h:673
CaloRecHit::detid
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
const bool recHitEnergy_keV_
Definition: PFRecHitQTests.h:674
PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
const double recHitEnergyMultiplier_
Definition: PFRecHitQTests.h:675
edm::ESHandle
Definition: DTSurvey.h:22
HGCalGeometry::topology
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:111
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
PFRecHitQTestBase::PFRecHitQTestBase
PFRecHitQTestBase()=default
cc
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalDetId
Definition: HGCalDetId.h:8
PFRecHitQTestThresholdInThicknessNormalizedMIPs::geomToken_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
Definition: PFRecHitQTests.h:684
Exception
Definition: hltDiff.cc:245
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
VarParsing.mult
mult
Definition: VarParsing.py:658
HGCalDDDConstants::waferTypeL
int waferTypeL(int wafer) const
Definition: HGCalDDDConstants.h:197
hit
Definition: SiStripHitEffFromCalibTree.cc:88