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

Constructor & Destructor Documentation

PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( )
inline

Definition at line 253 of file PFRecHitQTests.h.

253 {}
PFRecHitQTestHCALThresholdVsDepth::PFRecHitQTestHCALThresholdVsDepth ( const edm::ParameterSet iConfig)
inline

Definition at line 255 of file PFRecHitQTests.h.

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

255  : PFRecHitQTestBase(iConfig) {
256  std::vector<edm::ParameterSet> psets = iConfig.getParameter<std::vector<edm::ParameterSet> >("cuts");
257  for (auto& pset : psets) {
258  depths_ = pset.getParameter<std::vector<int> >("depth");
259  thresholds_ = pset.getParameter<std::vector<double> >("threshold");
260  detector_ = pset.getParameter<int>("detectorEnum");
261  if (thresholds_.size() != depths_.size()) {
262  throw cms::Exception("InvalidPFRecHitThreshold") << "PFRecHitThreshold mismatch with the numbers of depths";
263  }
264  }
265  }
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 267 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 269 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 270 of file PFRecHitQTests.h.

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

270  {
271  return test(rh.detid(), rh.energy(), rh.time(), clean);
272  }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HFRecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 274 of file PFRecHitQTests.h.

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

274  {
275  return test(rh.detid(), rh.energy(), rh.time(), clean);
276  }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const HORecHit rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 277 of file PFRecHitQTests.h.

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

277  {
278  return test(rh.detid(), rh.energy(), rh.time(), clean);
279  }
constexpr float energy() const
Definition: CaloRecHit.h:29
constexpr const DetId & detid() const
Definition: CaloRecHit.h:33
bool test(reco::PFRecHit &hit, const EcalRecHit &rh, bool &clean, bool fullReadOut) override
static void clean(char *s)
constexpr float time() const
Definition: CaloRecHit.h:31
bool PFRecHitQTestHCALThresholdVsDepth::test ( reco::PFRecHit hit,
const CaloTower rh,
bool &  clean 
)
inlineoverridevirtual

Implements PFRecHitQTestBase.

Definition at line 281 of file PFRecHitQTests.h.

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

Implements PFRecHitQTestBase.

Definition at line 283 of file PFRecHitQTests.h.

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

Definition at line 290 of file PFRecHitQTests.h.

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

290  {
291  HcalDetId detid(aDETID);
292 
293  for (unsigned int i = 0; i < thresholds_.size(); ++i) {
294  if (detid.depth() == depths_[i] && detid.subdet() == detector_) {
295  if (energy < thresholds_[i]) {
296  clean = false;
297  return false;
298  }
299  break;
300  }
301  }
302  return true;
303  }
std::vector< double > thresholds_
static void clean(char *s)

Member Data Documentation

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

Definition at line 286 of file PFRecHitQTests.h.

int PFRecHitQTestHCALThresholdVsDepth::detector_
protected

Definition at line 288 of file PFRecHitQTests.h.

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

Definition at line 287 of file PFRecHitQTests.h.