CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
IdealGeometryRecord
geomToken_
 

Detailed Description

Definition at line 621 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestThresholdInThicknessNormalizedMIPs::PFRecHitQTestThresholdInThicknessNormalizedMIPs ( )
inline
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()) {}
PFRecHitQTestBase()=default
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 635 of file PFRecHitQTests.h.

References ddd_, geomToken_, and edm::EventSetup::getHandle().

635  {
637  ddd_ = &(geoHandle->topology().dddConstants());
638  }
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > geomToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass ( const reco::PFRecHit hit,
const float  mult 
)
inlineprotected

Definition at line 678 of file PFRecHitQTests.h.

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

Referenced by test().

678  {
679  const double hitValueInMIPs = 1e6 * hit.energy() / (mult * mip_);
680  return hitValueInMIPs > threshold_;
681  }
float energy() const
rechit energy
Definition: PFRecHit.h:99
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
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 HBHERecHit 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 HFRecHit 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 HORecHit 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  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 658 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 663 of file PFRecHitQTests.h.

References ddd_, CaloRecHit::detid(), CaloRecHit::energy(), VarParsing::mult, pass(), recHitEnergy_keV_, recHitEnergyMultiplier_, reco::PFRecHit::setEnergy(), and HGCalDDDConstants::waferTypeL().

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  }
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:69

Member Data Documentation

const HGCalDDDConstants* PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
protected

Definition at line 676 of file PFRecHitQTests.h.

Referenced by beginEvent(), and test().

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 673 of file PFRecHitQTests.h.

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

Definition at line 684 of file PFRecHitQTests.h.

Referenced by beginEvent().

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by pass().

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 674 of file PFRecHitQTests.h.

Referenced by test().

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by test().

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 675 of file PFRecHitQTests.h.

Referenced by pass().