CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
PFRecHitQTestECALMultiThreshold Class Reference

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestECALMultiThreshold:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup) override
 
 PFRecHitQTestECALMultiThreshold ()
 
 PFRecHitQTestECALMultiThreshold (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)
 

Protected Attributes

bool applySelectionsToAllCrystals_
 
bool endcapGeometrySet_
 
const std::vector< double > thresholds_
 

Detailed Description

Definition at line 450 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( )
inline

Definition at line 452 of file PFRecHitQTests.h.

452  {
453  }
PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( const edm::ParameterSet iConfig)
inline

Definition at line 455 of file PFRecHitQTests.h.

References edm::errors::Configuration, and EcalRingCalibrationTools::N_RING_TOTAL.

455  :
456  PFRecHitQTestBase(iConfig),
457  thresholds_(iConfig.getParameter<std::vector<double> >("thresholds")),
458  applySelectionsToAllCrystals_(iConfig.getParameter<bool>("applySelectionsToAllCrystals"))
459  {
461  throw edm::Exception(edm::errors::Configuration, "ValueError")
462  << "thresholds is expected to have " << EcalRingCalibrationTools::N_RING_TOTAL << " elements but has " << thresholds_.size();
463  }
T getParameter(std::string const &) const
const std::vector< double > thresholds_
PFRecHitQTestBase()=default
static constexpr short N_RING_TOTAL

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 465 of file PFRecHitQTests.h.

References DetId::Ecal, EcalEndcap, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), and EcalRingCalibrationTools::setCaloGeometry().

465  {
467  iSetup.get<CaloGeometryRecord>().get(pG);
469  endcapGeometrySet_=false;
470  if (endcapGeometry) {
472  endcapGeometrySet_=true;
473  }
474  }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:44
static void setCaloGeometry(const CaloGeometry *geometry)
const T & get() const
Definition: EventSetup.h:59
bool PFRecHitQTestECALMultiThreshold::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 507 of file PFRecHitQTests.h.

References reco::PFRecHit::detId(), EcalBarrel, reco::PFRecHit::energy(), and EcalRingCalibrationTools::getRingIndex().

507  {
508 
509  DetId detId(hit.detId());
510 
511  // this is to skip endcap ZS for Phase2 until there is a defined geometry
512  // apply the loosest ZS threshold, for the first eta-ring in EB
513  if (not endcapGeometrySet_) {
514 
515  // there is only ECAL EB in Phase 2
516  if(detId.subdetId() != EcalBarrel) return true;
517 
518  // 0-169: EB eta-rings
519  // 170-208: EE- eta rings
520  // 209-247: EE+ eta rings
521  int firstEBRing = 0;
522  return (hit.energy() > thresholds_[firstEBRing]);
523  }
524 
525  int iring = EcalRingCalibrationTools::getRingIndex(detId);
526  if (hit.energy() > thresholds_[iring]) return true;
527 
528  return false;
529  }
unsigned detId() const
rechit detId
Definition: PFRecHit.h:108
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
float energy() const
rechit energy
Definition: PFRecHit.h:114
const std::vector< double > thresholds_
Definition: DetId.h:18
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 476 of file PFRecHitQTests.h.

References or, and PFRecHitQTestThreshold::pass().

476  {
477  if (applySelectionsToAllCrystals_) return pass(hit);
478  else return fullReadOut or pass(hit);
479  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
bool pass(const reco::PFRecHit &hit)
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 480 of file PFRecHitQTests.h.

480  {
481  return true;
482  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 484 of file PFRecHitQTests.h.

484  {
485  return true;
486  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 487 of file PFRecHitQTests.h.

487  {
488  return true;
489  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 491 of file PFRecHitQTests.h.

491  {
492  return true;
493  }
bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 495 of file PFRecHitQTests.h.

495  {
496  return true;
497  }

Member Data Documentation

bool PFRecHitQTestECALMultiThreshold::applySelectionsToAllCrystals_
protected

Definition at line 504 of file PFRecHitQTests.h.

bool PFRecHitQTestECALMultiThreshold::endcapGeometrySet_
protected

Definition at line 501 of file PFRecHitQTests.h.

const std::vector<double> PFRecHitQTestECALMultiThreshold::thresholds_
protected

Definition at line 500 of file PFRecHitQTests.h.