CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 727 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

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

Definition at line 737 of file PFRecHitQTests.h.

737  :
738  PFRecHitQTestBase(iConfig),
739  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
740  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
741  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
742  mip_(iConfig.getParameter<double>("mipValueInkeV")),
743  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {
744  }
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 746 of file PFRecHitQTests.h.

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

746  {
748  iSetup.get<IdealGeometryRecord>().get(geometryInstance_, geoHandle);
749  ddd_ = &(geoHandle->topology().dddConstants());
750  }
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:98
const HGCalDDDConstants & dddConstants() const
const T & get() const
Definition: EventSetup.h:58
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass ( const reco::PFRecHit hit,
const float  mult 
)
inlineprotected

Definition at line 796 of file PFRecHitQTests.h.

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

796  {
797  const double hitValueInMIPs = 1e6*hit.energy()/(mult*mip_);
798  return hitValueInMIPs > threshold_;
799  }
float energy() const
rechit energy
Definition: PFRecHit.h:114
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 752 of file PFRecHitQTests.h.

References Exception.

752  {
753  throw cms::Exception("WrongDetector")
754  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
755  return false;
756  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 757 of file PFRecHitQTests.h.

References Exception.

757  {
758  throw cms::Exception("WrongDetector")
759  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
760  return false;
761  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 763 of file PFRecHitQTests.h.

References Exception.

763  {
764  throw cms::Exception("WrongDetector")
765  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
766  return false;
767  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 768 of file PFRecHitQTests.h.

References Exception.

768  {
769  throw cms::Exception("WrongDetector")
770  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
771  return false;
772  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 774 of file PFRecHitQTests.h.

References Exception.

774  {
775  throw cms::Exception("WrongDetector")
776  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
777  return false;
778  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 780 of file PFRecHitQTests.h.

References CaloRecHit::detid(), CaloRecHit::energy(), objects.autophobj::float, PFRecHitQTestThreshold::pass(), and reco::PFRecHit::setEnergy().

780  {
781  const double newE = ( recHitEnergy_keV_ ?
782  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
784  const int wafer = HGCalDetId(rh.detid()).wafer();
785  const float mult = (float) ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
786  hit.setEnergy(newE);
787  return pass(hit, mult);
788  }
const DetId & detid() const
Definition: CaloRecHit.h:21
bool pass(const reco::PFRecHit &hit, const float mult)
float energy() const
Definition: CaloRecHit.h:17
int waferTypeL(int wafer) const
void setEnergy(float energy)
Definition: PFRecHit.h:74

Member Data Documentation

const HGCalDDDConstants* PFRecHitQTestThresholdInThicknessNormalizedMIPs::ddd_
protected

Definition at line 794 of file PFRecHitQTests.h.

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 791 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 793 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 792 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 793 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 793 of file PFRecHitQTests.h.