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 CaloTower &rh, bool &clean) override
 
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 HGCRecHit &rh, bool &clean) override
 
bool test (reco::PFRecHit &hit, const HORecHit &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 346 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

◆ PFRecHitQTestECALMultiThreshold() [1/2]

PFRecHitQTestECALMultiThreshold::PFRecHitQTestECALMultiThreshold ( )
inline

Definition at line 348 of file PFRecHitQTests.h.

348 {}

◆ PFRecHitQTestECALMultiThreshold() [2/2]

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

Definition at line 350 of file PFRecHitQTests.h.

351  : PFRecHitQTestBase(iConfig),
352  thresholds_(iConfig.getParameter<std::vector<double> >("thresholds")),
353  applySelectionsToAllCrystals_(iConfig.getParameter<bool>("applySelectionsToAllCrystals")) {
355  throw edm::Exception(edm::errors::Configuration, "ValueError")
356  << "thresholds is expected to have " << EcalRingCalibrationTools::N_RING_TOTAL << " elements but has "
357  << thresholds_.size();
358  }

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

Member Function Documentation

◆ beginEvent()

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

◆ pass()

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

Definition at line 393 of file PFRecHitQTests.h.

393  {
394  DetId detId(hit.detId());
395 
396  // this is to skip endcap ZS for Phase2 until there is a defined geometry
397  // apply the loosest ZS threshold, for the first eta-ring in EB
398  if (not endcapGeometrySet_) {
399  // there is only ECAL EB in Phase 2
400  if (detId.subdetId() != EcalBarrel)
401  return true;
402 
403  // 0-169: EB eta-rings
404  // 170-208: EE- eta rings
405  // 209-247: EE+ eta rings
406  int firstEBRing = 0;
407  return (hit.energy() > thresholds_[firstEBRing]);
408  }
409 
410  int iring = EcalRingCalibrationTools::getRingIndex(detId);
411  if (hit.energy() > thresholds_[iring])
412  return true;
413 
414  return false;
415  }

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

Referenced by test().

◆ test() [1/6]

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

Implements PFRecHitQTestBase.

Definition at line 382 of file PFRecHitQTests.h.

382 { return true; }

◆ test() [2/6]

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

Implements PFRecHitQTestBase.

Definition at line 371 of file PFRecHitQTests.h.

371  {
373  return pass(hit);
374  else
375  return fullReadOut or pass(hit);
376  }

References applySelectionsToAllCrystals_, or, and pass().

◆ test() [3/6]

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

Implements PFRecHitQTestBase.

Definition at line 377 of file PFRecHitQTests.h.

377 { return true; }

◆ test() [4/6]

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

Implements PFRecHitQTestBase.

Definition at line 379 of file PFRecHitQTests.h.

379 { return true; }

◆ test() [5/6]

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

Implements PFRecHitQTestBase.

Definition at line 384 of file PFRecHitQTests.h.

384 { return true; }

◆ test() [6/6]

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

Implements PFRecHitQTestBase.

Definition at line 380 of file PFRecHitQTests.h.

380 { return true; }

Member Data Documentation

◆ applySelectionsToAllCrystals_

bool PFRecHitQTestECALMultiThreshold::applySelectionsToAllCrystals_
protected

Definition at line 391 of file PFRecHitQTests.h.

Referenced by test().

◆ endcapGeometrySet_

bool PFRecHitQTestECALMultiThreshold::endcapGeometrySet_
protected

Definition at line 388 of file PFRecHitQTests.h.

Referenced by beginEvent(), and pass().

◆ thresholds_

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

Definition at line 387 of file PFRecHitQTests.h.

Referenced by pass(), and PFRecHitQTestECALMultiThreshold().

PFRecHitQTestECALMultiThreshold::pass
bool pass(const reco::PFRecHit &hit)
Definition: PFRecHitQTests.h:393
EcalRingCalibrationTools::getRingIndex
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
Definition: EcalRingCalibrationTools.cc:24
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
PFRecHitQTestECALMultiThreshold::applySelectionsToAllCrystals_
bool applySelectionsToAllCrystals_
Definition: PFRecHitQTests.h:391
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
EcalBarrel
Definition: EcalSubdetector.h:10
edm::Exception
Definition: EDMException.h:77
DetId
Definition: DetId.h:17
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESHandle< CaloGeometry >
PFRecHitQTestECALMultiThreshold::thresholds_
const std::vector< double > thresholds_
Definition: PFRecHitQTests.h:387
EcalEndcap
Definition: EcalSubdetector.h:10
EcalRingCalibrationTools::N_RING_TOTAL
static constexpr short N_RING_TOTAL
Definition: EcalRingCalibrationTools.h:37
PFRecHitQTestBase::PFRecHitQTestBase
PFRecHitQTestBase()=default
DetId::Ecal
Definition: DetId.h:27
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFRecHitQTestECALMultiThreshold::endcapGeometrySet_
bool endcapGeometrySet_
Definition: PFRecHitQTests.h:388
or
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
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
EcalRingCalibrationTools::setCaloGeometry
static void setCaloGeometry(const CaloGeometry *geometry)
Definition: EcalRingCalibrationTools.cc:181
edm::errors::Configuration
Definition: EDMException.h:36
hit
Definition: SiStripHitEffFromCalibTree.cc:88