CMS 3D CMS Logo

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)
 
 PFRecHitQTestThresholdInThicknessNormalizedMIPs ()
 
 PFRecHitQTestThresholdInThicknessNormalizedMIPs (const edm::ParameterSet &iConfig)
 
bool test (reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut)
 
bool test (reco::PFRecHit &hit, const HBHERecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HFRecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HORecHit &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const CaloTower &rh, bool &clean)
 
bool test (reco::PFRecHit &hit, const HGCRecHit &rh, bool &clean)
 
- Public Member Functions inherited from PFRecHitQTestBase
 PFRecHitQTestBase ()
 
 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 730 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

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

Definition at line 740 of file PFRecHitQTests.h.

740  :
741  PFRecHitQTestBase(iConfig),
742  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
743  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
744  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
745  mip_(iConfig.getParameter<double>("mipValueInkeV")),
746  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {
747  }
T getParameter(std::string const &) const

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 749 of file PFRecHitQTests.h.

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

749  {
751  iSetup.get<IdealGeometryRecord>().get(geometryInstance_,geoHandle);
752  ddd_ = &(geoHandle->topology().dddConstants());
753  }
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:96
const HGCalDDDConstants & dddConstants() const
const T & get() const
Definition: EventSetup.h:56
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::pass ( const reco::PFRecHit hit,
const float  mult 
)
inlineprotected

Definition at line 799 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 755 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 760 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 766 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 771 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 777 of file PFRecHitQTests.h.

References Exception.

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

Implements PFRecHitQTestBase.

Definition at line 783 of file PFRecHitQTests.h.

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

783  {
784  const double newE = ( recHitEnergy_keV_ ?
785  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
787  const int wafer = HGCalDetId(rh.detid()).wafer();
788  const float mult = (float) ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
789  hit.setEnergy(newE);
790  return pass(hit,mult);
791  }
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 797 of file PFRecHitQTests.h.

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 794 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 796 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 795 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 796 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 796 of file PFRecHitQTests.h.