CMS 3D CMS Logo

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

#include <PFRecHitQTests.h>

Inheritance diagram for PFRecHitQTestHCALThresholdVsDepth:
PFRecHitQTestBase

Public Member Functions

void beginEvent (const edm::Event &event, const edm::EventSetup &iSetup) override
 
 PFRecHitQTestHCALThresholdVsDepth ()
 
 PFRecHitQTestHCALThresholdVsDepth (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 test (unsigned aDETID, double energy, double time, bool &clean)
 

Protected Attributes

std::vector< int > depths_
 
int detector_
 
std::vector< double > thresholds_
 

Detailed Description

Definition at line 315 of file PFRecHitQTests.h.

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 317 of file PFRecHitQTests.h.

317  {
318  }
PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 320 of file PFRecHitQTests.h.

References Exception, edm::ParameterSet::getParameter(), and muonDTDigis_cfi::pset.

320  :
321  PFRecHitQTestBase(iConfig)
322  {
323  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
324  for (auto & pset : psets) {
325  depths_=pset.getParameter<std::vector<int> >("depth");
326  thresholds_=pset.getParameter<std::vector<double> >("threshold");
327  detector_=pset.getParameter<int>("detectorEnum");
328  if(thresholds_.size()!=depths_.size()) {
329  throw cms::Exception("InvalidPFRecHitThreshold")
330  << "PFRecHitThreshold mismatch with the numbers of depths";
331  }
332  }
333  }
T getParameter(std::string const &) const
std::vector< double > thresholds_
PFRecHitQTestBase()=default

Member Function Documentation

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

Implements PFRecHitQTestBase.

Definition at line 335 of file PFRecHitQTests.h.

335  {
336  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const EcalRecHit rh,
bool &  clean,
bool  fullReadOut 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 338 of file PFRecHitQTests.h.

338  {
339  return true;
340  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HBHERecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 341 of file PFRecHitQTests.h.

References clean, CaloRecHit::detid(), CaloRecHit::energy(), PFRecHitQTestThreshold::test(), and CaloRecHit::time().

341  {
342  return test(rh.detid(), rh.energy(), rh.time(), clean);
343  }
const DetId & detid() const
Definition: CaloRecHit.h:21
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 345 of file PFRecHitQTests.h.

References clean, CaloRecHit::detid(), CaloRecHit::energy(), PFRecHitQTestThreshold::test(), and CaloRecHit::time().

345  {
346  return test(rh.detid(), rh.energy(), rh.time(), clean);
347  }
const DetId & detid() const
Definition: CaloRecHit.h:21
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 348 of file PFRecHitQTests.h.

References clean, CaloRecHit::detid(), CaloRecHit::energy(), PFRecHitQTestThreshold::test(), and CaloRecHit::time().

348  {
349  return test(rh.detid(), rh.energy(), rh.time(), clean);
350  }
const DetId & detid() const
Definition: CaloRecHit.h:21
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
float time() const
Definition: CaloRecHit.h:19
float energy() const
Definition: CaloRecHit.h:17
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 352 of file PFRecHitQTests.h.

352  {
353  return true;
354  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HGCRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 356 of file PFRecHitQTests.h.

356  {
357  return true;
358  }
bool PFRecHitQTestHCALThresholdVsDepth::test ( unsigned  aDETID,
double  energy,
double  time,
bool &  clean 
)
inlineprotected

Definition at line 365 of file PFRecHitQTests.h.

References HcalDetId::depth(), mps_fire::i, and HcalDetId::subdet().

365  {
366  HcalDetId detid(aDETID);
367 
368  for (unsigned int i=0;i<thresholds_.size();++i) {
369  if (detid.depth() == depths_[i] && detid.subdet() == detector_ ) {
370  if ( energy<thresholds_[i])
371  {
372  clean=false;
373  return false;
374  }
375  break;
376  }
377  }
378  return true;
379  }
std::vector< double > thresholds_
std::vector< T * > clean
Definition: MVATrainer.cc:156

Member Data Documentation

std::vector<int> PFRecHitQTestHCALThresholdVsDepth::depths_
protected

Definition at line 361 of file PFRecHitQTests.h.

int PFRecHitQTestHCALThresholdVsDepth::detector_
protected

Definition at line 363 of file PFRecHitQTests.h.

std::vector<double> PFRecHitQTestHCALThresholdVsDepth::thresholds_
protected

Definition at line 362 of file PFRecHitQTests.h.