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 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)
 

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

Constructor & Destructor Documentation

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

Definition at line 659 of file PFRecHitQTests.h.

659  :
660  PFRecHitQTestBase(iConfig),
661  geometryInstance_(iConfig.getParameter<std::string>("geometryInstance")),
662  recHitEnergy_keV_(iConfig.getParameter<bool>("recHitEnergyIs_keV")),
663  threshold_(iConfig.getParameter<double>("thresholdInMIPs")),
664  mip_(iConfig.getParameter<double>("mipValueInkeV")),
665  recHitEnergyMultiplier_(iConfig.getParameter<double>("recHitEnergyMultiplier")) {
666  }
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 668 of file PFRecHitQTests.h.

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

668  {
670  iSetup.get<IdealGeometryRecord>().get(geometryInstance_,geoHandle);
671  ddd_ = &(geoHandle->topology().dddConstants());
672  }
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 718 of file PFRecHitQTests.h.

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

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

Implements PFRecHitQTestBase.

Definition at line 674 of file PFRecHitQTests.h.

References Exception.

674  {
675  throw cms::Exception("WrongDetector")
676  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
677  return false;
678  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 679 of file PFRecHitQTests.h.

References Exception.

679  {
680  throw cms::Exception("WrongDetector")
681  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
682  return false;
683  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 685 of file PFRecHitQTests.h.

References Exception.

685  {
686  throw cms::Exception("WrongDetector")
687  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
688  return false;
689  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 690 of file PFRecHitQTests.h.

References Exception.

690  {
691  throw cms::Exception("WrongDetector")
692  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
693  return false;
694  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 696 of file PFRecHitQTests.h.

References Exception.

696  {
697  throw cms::Exception("WrongDetector")
698  << "PFRecHitQTestThresholdInMIPs only works for HGCAL!";
699  return false;
700  }
bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlinevirtual

Implements PFRecHitQTestBase.

Definition at line 702 of file PFRecHitQTests.h.

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

702  {
703  const double newE = ( recHitEnergy_keV_ ?
704  1.0e-6*rh.energy()*recHitEnergyMultiplier_ :
706  const int wafer = HGCalDetId(rh.detid()).wafer();
707  const float mult = (float) ddd_->waferTypeL(wafer); // 1 for 100um, 2 for 200um, 3 for 300um
708  hit.setEnergy(newE);
709  return pass(hit,mult);
710  }
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 716 of file PFRecHitQTests.h.

const std::string PFRecHitQTestThresholdInThicknessNormalizedMIPs::geometryInstance_
protected

Definition at line 713 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::mip_
protected

Definition at line 715 of file PFRecHitQTests.h.

const bool PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergy_keV_
protected

Definition at line 714 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::recHitEnergyMultiplier_
protected

Definition at line 715 of file PFRecHitQTests.h.

const double PFRecHitQTestThresholdInThicknessNormalizedMIPs::threshold_
protected

Definition at line 715 of file PFRecHitQTests.h.