CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private 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, 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)
 

Protected Attributes

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

Private Attributes

edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomToken_
 

Detailed Description

Definition at line 384 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestECALMultiThreshold() [1/2]

PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( )
inline

Definition at line 386 of file PFRecHitQTests.h.

386 {}

◆ PFRecHitQTestECALMultiThreshold() [2/2]

PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( const edm::ParameterSet iConfig,
edm::ConsumesCollector cc 
)
inline

Definition at line 388 of file PFRecHitQTests.h.

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

389  : PFRecHitQTestBase(iConfig, cc),
390  thresholds_(iConfig.getParameter<std::vector<double>>("thresholds")),
391  applySelectionsToAllCrystals_(iConfig.getParameter<bool>("applySelectionsToAllCrystals")),
392  geomToken_(cc.esConsumes()) {
394  throw edm::Exception(edm::errors::Configuration, "ValueError")
395  << "thresholds is expected to have " << EcalRingCalibrationTools::N_RING_TOTAL << " elements but has "
396  << thresholds_.size();
397  }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
const std::vector< double > thresholds_
PFRecHitQTestBase()=default
static constexpr short N_RING_TOTAL

Member Function Documentation

◆ beginEvent()

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

Implements PFRecHitQTestBase.

Definition at line 399 of file PFRecHitQTests.h.

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

399  {
402  endcapGeometrySet_ = false;
403  if (endcapGeometry) {
405  endcapGeometrySet_ = true;
406  }
407  }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
static void setCaloGeometry(const CaloGeometry *geometry)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34

◆ pass()

bool PFRecHitQTestECALMultiThreshold::pass ( const reco::PFRecHit hit)
inlineprotected

Definition at line 431 of file PFRecHitQTests.h.

References hcalRecHitTable_cff::detId, EcalBarrel, endcapGeometrySet_, EcalRingCalibrationTools::getRingIndex(), and thresholds_.

Referenced by test().

431  {
432  DetId detId(hit.detId());
433 
434  // this is to skip endcap ZS for Phase2 until there is a defined geometry
435  // apply the loosest ZS threshold, for the first eta-ring in EB
436  if (not endcapGeometrySet_) {
437  // there is only ECAL EB in Phase 2
438  if (detId.subdetId() != EcalBarrel)
439  return true;
440 
441  // 0-169: EB eta-rings
442  // 170-208: EE- eta rings
443  // 209-247: EE+ eta rings
444  int firstEBRing = 0;
445  return (hit.energy() > thresholds_[firstEBRing]);
446  }
447 
449  if (hit.energy() > thresholds_[iring])
450  return true;
451 
452  return false;
453  }
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
const std::vector< double > thresholds_
Definition: DetId.h:17

◆ test() [1/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 409 of file PFRecHitQTests.h.

References applySelectionsToAllCrystals_, or, and pass().

409  {
411  return pass(hit);
412  else
413  return fullReadOut or pass(hit);
414  }
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)

◆ test() [2/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 415 of file PFRecHitQTests.h.

415 { return true; }

◆ test() [3/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 417 of file PFRecHitQTests.h.

417 { return true; }

◆ test() [4/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 418 of file PFRecHitQTests.h.

418 { return true; }

◆ test() [5/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 420 of file PFRecHitQTests.h.

420 { return true; }

◆ test() [6/6]

bool PFRecHitQTestECALMultiThreshold::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 422 of file PFRecHitQTests.h.

422 { return true; }

Member Data Documentation

◆ applySelectionsToAllCrystals_

bool PFRecHitQTestECALMultiThreshold::applySelectionsToAllCrystals_
protected

Definition at line 429 of file PFRecHitQTests.h.

Referenced by test().

◆ endcapGeometrySet_

bool PFRecHitQTestECALMultiThreshold::endcapGeometrySet_
protected

Definition at line 426 of file PFRecHitQTests.h.

Referenced by beginEvent(), and pass().

◆ geomToken_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> PFRecHitQTestECALMultiThreshold::geomToken_
private

Definition at line 456 of file PFRecHitQTests.h.

Referenced by beginEvent().

◆ thresholds_

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

Definition at line 425 of file PFRecHitQTests.h.

Referenced by pass(), and PFRecHitQTestECALMultiThreshold().